/* ==========================================================================
   EventWeb — site theme (global; NavLink needs non-scoped CSS)
   ========================================================================== */

:root {
    --ew-primary: #1d4ed8;
    --ew-primary-light: #2563eb;
    --ew-primary-dark: #1e40af;
    --ew-accent: #1d4ed8;

    /* Corporate sidebar — light rail */
    --ew-sidebar-bg: #f8fafc;
    --ew-sidebar-surface: #ffffff;
    --ew-sidebar-border: #e2e8f0;
    --ew-sidebar-text: #64748b;
    --ew-sidebar-text-hover: #334155;
    --ew-sidebar-text-active: #0f172a;
    --ew-sidebar-hover: #eef2f7;
    --ew-sidebar-active: #e8efff;

    /* Work area */
    --ew-canvas: #eef1f6;
    --ew-bg: var(--ew-canvas);
    --ew-bg-page: var(--ew-canvas);
    --ew-surface: #f1f5f9;
    --ew-surface-raised: #ffffff;
    --ew-topbar-bg: #ffffff;
    --ew-input-bg: #ffffff;

    --ew-text: #0f172a;
    --ew-text-muted: #64748b;
    --ew-border: #e2e8f0;
    --ew-border-strong: #cbd5e1;

    --ew-radius: 6px;
    --ew-radius-sm: 4px;
    --ew-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    --ew-shadow-hover: 0 1px 3px rgba(15, 23, 42, 0.08);
    --ew-content-max: 1200px;
    --ew-sidebar-width: 240px;
    --ew-topbar-height: 3.25rem;
    --ew-app-breakpoint: 992px;

    /* Forum feed design tokens */
    --forum-max: 470px;
    --forum-gap: 0.75rem;
    --forum-card-pad: 0.75rem;
    --forum-radius: 12px;
    --forum-shadow: var(--ew-shadow);
    --forum-font-sm: 0.75rem;
    --forum-font-base: 0.875rem;
    --forum-muted: var(--ew-text-muted);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--ew-text);
    background: var(--ew-canvas);
    -webkit-font-smoothing: antialiased;
}

#app {
    min-height: 100dvh;
    width: 100%;
}

/* Top navigation links */
.site-nav a,
.site-nav a:visited,
.site-nav a:hover,
.site-nav a:focus,
.site-nav a:active {
    text-decoration: none !important;
    color: #424242;
    outline: none;
}

.site-nav a.active {
    color: var(--ew-primary) !important;
    font-weight: 600;
}

/* Site shell — full-width website layout */
.site-shell {
    width: 100%;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--ew-canvas);
}

.site-shell--hub .site-content {
    padding-top: 1rem;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(224, 224, 224, 0.85);
    box-shadow: 0 1px 8px rgba(57, 73, 171, 0.04);
}

.site-header-inner {
    max-width: var(--ew-content-max);
    margin: 0 auto;
    padding: 0 1.5rem;
    min-height: 3.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.site-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ew-primary);
    text-decoration: none !important;
    letter-spacing: 0.01em;
}

.site-brand:hover {
    color: var(--ew-primary-light);
}

.site-back-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ew-primary);
    text-decoration: none !important;
    padding: 0.35rem 0;
    white-space: nowrap;
}

.site-back-link:hover {
    color: var(--ew-primary-light);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex-wrap: wrap;
}

.site-nav .nav-item {
    padding: 0.5rem 0.85rem;
    font-size: 0.95rem;
    border-radius: 6px;
    transition: color 0.15s ease, background 0.15s ease;
}

.site-nav .nav-item:hover {
    background: rgba(57, 73, 171, 0.06);
}

.site-nav .nav-item.active {
    background: rgba(57, 73, 171, 0.08);
}

.site-content {
    flex: 1;
    width: 100%;
    max-width: var(--ew-content-max);
    margin: 0 auto;
    padding: 1.5rem;
}

/* ==========================================================================
   App shell — sidebar (desktop) + topbar + mobile drawer
   ========================================================================== */

.app-shell {
    display: flex;
    min-height: 100dvh;
    background: var(--ew-canvas);
}

.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1200;
    width: min(var(--ew-sidebar-width), 85vw);
    height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--ew-sidebar-bg);
    border-right: 1px solid var(--ew-sidebar-border);
    box-shadow: 2px 0 16px rgba(15, 23, 42, 0.06);
    transform: translateX(-100%);
    transition: transform 0.2s ease;
}

.app-sidebar.open {
    transform: translateX(0);
}

.app-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1190;
    border: none;
    background: rgba(15, 23, 42, 0.28);
    cursor: pointer;
}

.app-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--ew-sidebar-border);
    background: var(--ew-sidebar-surface);
}

.app-sidebar-brand {
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ew-primary-dark);
    text-decoration: none !important;
}

.app-sidebar-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius-sm);
    background: #fff;
    color: #64748b;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.app-sidebar-close:hover {
    background: var(--ew-sidebar-hover);
    color: var(--ew-text);
    border-color: var(--ew-border-strong);
}

.app-sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0.75rem 0.55rem;
}

.app-sidebar-nav-main {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.app-sidebar-nav-bottom {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 0.55rem;
    border-top: 1px solid var(--ew-sidebar-border);
}

.app-sidebar-nav--account {
    flex: 0 0 auto;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: 0.15rem;
    padding-top: 0.35rem;
}

.app-sidebar-section-label {
    margin: 0 0 0.35rem;
    padding: 0 0.65rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
}

.app-nav-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.65rem;
    margin-bottom: 0.1rem;
    border-radius: var(--ew-radius-sm);
    border: 1px solid transparent;
    text-decoration: none !important;
    color: var(--ew-sidebar-text);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.app-nav-item:hover {
    background: var(--ew-sidebar-hover);
    color: var(--ew-sidebar-text-hover);
}

.app-nav-item.active {
    background: var(--ew-sidebar-active);
    border-color: #bfdbfe;
    color: var(--ew-primary-dark);
    font-weight: 600;
}

.app-nav-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 4px;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: #e2e8f0;
    color: #475569;
    flex-shrink: 0;
}

.app-nav-item.active .app-nav-mark {
    background: var(--ew-primary);
    color: #fff;
}

.app-nav-group {
    margin-bottom: 0.2rem;
}

.app-nav-group-toggle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.55rem 0.65rem;
    margin-bottom: 0.05rem;
    border: 1px solid transparent;
    border-radius: var(--ew-radius-sm);
    background: none;
    text-align: left;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ew-sidebar-text);
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.app-nav-group-toggle:hover {
    background: var(--ew-sidebar-hover);
    color: var(--ew-sidebar-text-hover);
}

.app-nav-group--active .app-nav-group-toggle,
.app-nav-group-toggle.active {
    color: var(--ew-primary);
}

.app-nav-group--open .app-nav-group-toggle {
    margin-bottom: 0.1rem;
}

.app-nav-chevron {
    margin-left: auto;
    font-size: 1rem;
    line-height: 1;
    opacity: 0.55;
    transform: rotate(0deg);
    transition: transform 0.18s ease;
}

.app-nav-group--open .app-nav-chevron {
    transform: rotate(90deg);
}

.app-nav-subitems {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    margin-bottom: 0.15rem;
    padding-left: 0.15rem;
}

.app-nav-subitem {
    padding-left: 2.4rem;
    font-size: 0.8125rem;
    font-weight: 500;
}

.app-nav-subitem.active {
    font-weight: 600;
}

.app-sidebar-footer {
    padding: 0.75rem 1rem 0.85rem;
    border-top: 1px solid var(--ew-sidebar-border);
    background: var(--ew-sidebar-surface);
}

.app-sidebar-user {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ew-text);
}

.app-sidebar-role {
    margin: 0.12rem 0 0;
    font-size: 0.72rem;
    color: var(--ew-text-muted) !important;
}

.app-main {
    flex: 1;
    min-width: 0;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--ew-canvas);
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: var(--ew-topbar-height);
    padding: 0 1.15rem;
    background: var(--ew-topbar-bg);
    border-bottom: 1px solid var(--ew-border);
    box-shadow: var(--ew-shadow);
}

.app-topbar-start,
.app-topbar-end {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.app-topbar-end {
    margin-left: auto;
    flex-shrink: 0;
}

.app-topbar-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    font-size: 1.75rem;
    font-weight: 300;
    line-height: 1;
    color: var(--ew-text);
    text-decoration: none;
}

.app-topbar-back:hover {
    color: var(--ew-primary);
}

.app-menu-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius-sm);
    background: #ffffff;
    color: #64748b;
    cursor: pointer;
    box-shadow: var(--ew-shadow);
}

.app-menu-btn:hover {
    border-color: #94a3b8;
    background: #f8fafc;
    color: #475569;
}

.app-menu-bar {
    display: block;
    width: 0.9rem;
    height: 1.5px;
    background: currentColor;
    border-radius: 1px;
}

.app-profile-menu-wrap {
    position: relative;
    flex-shrink: 0;
}

.app-profile-menu-btn {
    box-shadow: none;
}

.app-profile-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    border: none;
    padding: 0;
    background: transparent;
    cursor: default;
}

.app-profile-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    z-index: 100;
    min-width: 9.5rem;
    padding: 0.35rem 0;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--ew-border);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.app-profile-menu-item {
    display: block;
    width: 100%;
    padding: 0.7rem 1rem;
    border: none;
    background: transparent;
    color: #1e293b;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.app-profile-menu-item:hover {
    background: #f8fafc;
}

.app-profile-menu-item--danger {
    color: #dc2626;
}

.app-profile-menu-item--danger:hover {
    background: #fef2f2;
}

.app-page-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ew-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-search-wrap {
    display: none;
}

.app-search {
    width: 100%;
    min-width: 0;
    padding: 0.42rem 0.65rem;
    border: 1px solid var(--ew-border-strong);
    border-radius: var(--ew-radius-sm);
    font-size: 0.8125rem;
    background: var(--ew-input-bg);
    color: var(--ew-text);
}

.app-search::placeholder {
    color: var(--ew-text-muted);
}

.app-search:focus {
    outline: none;
    border-color: var(--ew-primary);
    box-shadow: 0 0 0 2px rgba(74, 99, 216, 0.2);
}

/* Discover top bar — Shopee-style search beside cart */
.app-topbar--discover {
    gap: 0.55rem;
}

.app-topbar--discover .app-topbar-start {
    flex: 0 0 auto;
}

.app-topbar-discover-search-wrap {
    flex: 1;
    min-width: 0;
}

.app-topbar-discover-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.app-topbar-discover-search-icon {
    position: absolute;
    left: 0.65rem;
    width: 0.95rem;
    height: 0.95rem;
    color: var(--ew-text-muted);
    pointer-events: none;
}

.app-topbar-discover-search-input {
    width: 100%;
    min-width: 0;
    padding: 0.48rem 1.85rem 0.48rem 2.1rem;
    border: 1px solid var(--ew-border);
    border-radius: 999px;
    background: var(--ew-surface-raised, #f5f5f5);
    font-size: 0.8125rem;
    color: var(--ew-text);
    outline: none;
}

.app-topbar-discover-search-input::placeholder {
    color: var(--ew-text-muted);
}

.app-topbar-discover-search-input:focus {
    border-color: var(--ew-primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
    background: #fff;
}

.app-topbar-discover-search-clear {
    position: absolute;
    right: 0.25rem;
    width: 1.5rem;
    height: 1.5rem;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--ew-text-muted);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.app-topbar-discover-search-clear:hover {
    background: #f0f0f0;
    color: var(--ew-text);
}

.app-topbar--discover .app-topbar-end {
    flex: 0 0 auto;
}

.app-topbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0 0.6rem;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius-sm);
    background: #fff;
    color: #475569;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none !important;
    cursor: pointer;
    white-space: nowrap;
}

.app-topbar-btn:hover {
    border-color: #94a3b8;
    color: var(--ew-primary-dark);
    background: #f8fafc;
}

.app-topbar-btn--icon {
    position: relative;
    padding: 0 0.5rem;
}

.app-topbar-notify,
.app-topbar-cart {
    position: relative;
}

.app-topbar-cart-badge {
    position: absolute;
    top: 0.1rem;
    right: 0.15rem;
    min-width: 0.95rem;
    height: 0.95rem;
    padding: 0 0.2rem;
    border-radius: 999px;
    background: #ee4d2d;
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    line-height: 0.95rem;
    text-align: center;
}

.app-topbar-icon {
    width: 1rem;
    height: 1rem;
    display: block;
}

.app-topbar-profile {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.2rem 0.55rem 0.2rem 0.2rem;
    border: 1px solid var(--ew-border);
    border-radius: 999px;
    background: #fff;
    text-decoration: none !important;
    color: inherit;
}

.app-topbar-profile:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.app-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    background: #dbeafe;
    color: var(--ew-primary-dark);
    font-size: 0.72rem;
    font-weight: 700;
}

.app-topbar-username {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ew-text);
    max-width: 8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-logout-btn {
    color: #64748b;
    border-color: var(--ew-border);
    background: #fff;
}

.app-logout-btn:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.app-content {
    flex: 1;
    width: 100%;
    max-width: var(--ew-content-max);
    margin: 0 auto;
    padding: 1rem 1.15rem 1.25rem;
}

/* Auth / guest shells */
.auth-shell {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(29, 78, 216, 0.08), transparent),
        linear-gradient(165deg, #f4f7fc 0%, #eef2f8 50%, var(--ew-canvas) 100%);
}

.auth-content {
    width: 100%;
    max-width: 440px;
}

.auth-content .state-card {
    border: 1px solid var(--ew-border-strong);
}

.auth-card {
    padding: 0;
    overflow: hidden;
    border-radius: 14px;
    border-color: rgba(203, 213, 225, 0.85);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 8px 28px rgba(15, 23, 42, 0.07);
}

.auth-card-brand {
    padding: 1.5rem 1.5rem 0;
    text-align: center;
}

.auth-card-brand-name {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ew-primary-dark);
}

.auth-card-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin: 1.15rem 1.35rem 0;
    padding: 3px;
    background: #f1f5f9;
    border-radius: 10px;
}

.auth-card-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ew-text-muted);
    text-decoration: none !important;
    border-radius: 8px;
    transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.auth-card-tab--active {
    background: #fff;
    color: var(--ew-text);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

.auth-card-tab:not(.auth-card-tab--active):hover {
    color: var(--ew-text);
}

.auth-card-body {
    padding: 1.25rem 1.5rem 1.5rem;
}

.auth-card-lead {
    margin: 0 0 1.1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--ew-text-muted);
}

.auth-card-footer {
    margin-top: 1.15rem;
    padding-top: 1rem;
    border-top: 1px solid var(--ew-border);
    text-align: center;
}

.auth-card-footer-link {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ew-text-muted);
    text-decoration: none !important;
}

.auth-card-footer-link:hover {
    color: var(--ew-primary);
}

.auth-forgot-password {
    display: inline-block;
    margin-top: 0.4rem;
    padding: 0;
    border: none;
    background: none;
    color: var(--ew-primary);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
}

.auth-forgot-password:hover {
    text-decoration: underline;
}

.auth-forgot-message {
    margin: 0 0 0.75rem;
    font-size: 0.84rem;
    line-height: 1.45;
}

.auth-forgot-message--success {
    color: #15803d;
}

.auth-card .form-group {
    margin-bottom: 0.9rem;
}

.auth-card .form-group:last-of-type {
    margin-bottom: 0.5rem;
}

.auth-card .form-control {
    border-radius: 8px;
    padding: 0.62rem 0.78rem;
}

.auth-card .btn-primary {
    width: 100%;
    margin-top: 0.85rem;
    padding: 0.68rem 1rem;
    border-radius: 8px;
    text-align: center;
}

.auth-card .demo-login-hint {
    margin-bottom: 1rem;
    border-radius: 10px;
}

.auth-card .signin-divider {
    margin: 1.1rem 0 0.9rem;
}

.auth-google-section {
    margin-top: 0.15rem;
}

.auth-card .auth-firebase-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 0;
    padding: 0.68rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    text-align: center;
}

.auth-google-shell {
    position: relative;
    width: 100%;
}

.auth-google-custom-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    min-height: 44px;
    padding: 0.68rem 1rem;
    border: 1px solid #dadce0;
    border-radius: 8px;
    background: #fff;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.2;
    color: #3c4043;
    user-select: none;
    pointer-events: none;
}

.auth-google-icon {
    flex-shrink: 0;
}

.auth-google-loading-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--ew-border);
    border-top-color: var(--ew-primary);
    border-radius: 50%;
    animation: auth-google-spin 0.7s linear infinite;
}

@keyframes auth-google-spin {
    to { transform: rotate(360deg); }
}

.auth-google-error {
    margin: 0;
    padding: 0.65rem 0.75rem;
    font-size: 0.8125rem;
    text-align: center;
    color: #c62828;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
}

.auth-google-hint {
    margin: 0.65rem 0 0;
    font-size: 0.75rem;
    line-height: 1.4;
    text-align: center;
    color: var(--ew-text-muted);
}

.auth-complete-profile-lead {
    margin: 0 0 1rem;
}

.auth-account-type-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.auth-account-type-btn {
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--ew-border, #d1d5db);
    background: #fff;
    color: var(--ew-text, #111827);
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 0;
}

.auth-account-type-btn--active {
    border-color: var(--ew-primary, #2563eb);
    background: rgba(37, 99, 235, 0.08);
    font-weight: 600;
}

.auth-account-type-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-card .google-signin-btn-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    opacity: 0.011;
    cursor: pointer;
}

.auth-card .google-signin-btn-overlay > div {
    width: 100% !important;
    height: 100% !important;
}

.auth-card .google-signin-btn-overlay iframe {
    width: 100% !important;
    height: 44px !important;
    margin: 0 !important;
}

/* Register wizard */
.register-progress {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    margin: 0 0 1.1rem;
}

.register-progress-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    min-width: 4.5rem;
    text-align: center;
}

.register-progress-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ew-text-muted);
    background: #f1f5f9;
    border: 1.5px solid var(--ew-border);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.register-progress-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--ew-text-muted);
    line-height: 1.2;
}

.register-progress-item--active .register-progress-num {
    background: var(--ew-primary);
    border-color: var(--ew-primary-dark);
    color: #fff;
}

.register-progress-item--active .register-progress-label {
    color: var(--ew-text);
}

.register-progress-item--done .register-progress-num {
    background: #eff6ff;
    border-color: #93c5fd;
    color: var(--ew-primary-dark);
}

.register-progress-item--done .register-progress-label {
    color: var(--ew-primary-dark);
}

.register-progress-line {
    flex: 1;
    height: 2px;
    margin-top: 0.86rem;
    min-width: 1.25rem;
    background: var(--ew-border);
    border-radius: 1px;
}

.register-progress-line--done {
    background: #93c5fd;
}

.register-step-panel {
    min-height: 11.5rem;
}

.register-step-panel .form-group:last-child {
    margin-bottom: 0;
}

.register-referral-group {
    margin-top: 0.15rem;
}

.register-optional {
    font-weight: 400;
    color: var(--ew-text-muted);
}

.register-field-error {
    margin: 0.3rem 0 0;
    font-size: 0.8125rem;
    color: #c62828;
}

.register-step-error {
    margin: 0.75rem 0 0;
}

.register-step-actions {
    display: flex;
    gap: 0.65rem;
    margin-top: 0.85rem;
}

.register-step-actions .btn-primary,
.register-step-actions .btn-secondary {
    flex: 1;
    margin-top: 0;
    padding: 0.68rem 1rem;
    border-radius: 8px;
    text-align: center;
}

.register-step-back {
    flex: 0 0 auto;
    min-width: 5.5rem;
}

.referral-confirm--compact {
    margin-bottom: 0.85rem;
    padding: 0.55rem 0.7rem;
}

.referral-confirm--compact .referral-confirm-title {
    margin: 0;
    font-size: 0.8125rem;
}

.guest-shell {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--ew-canvas);
}

.guest-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1.15rem;
    min-height: var(--ew-topbar-height);
    background: #fff;
    border-bottom: 1px solid var(--ew-border);
    box-shadow: var(--ew-shadow);
}

.guest-brand {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--ew-primary-dark);
    text-decoration: none !important;
}

.guest-header-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.guest-link {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ew-text);
    text-decoration: none !important;
}

.guest-link-primary {
    padding: 0.38rem 0.75rem;
    border-radius: var(--ew-radius-sm);
    border: 1px solid var(--ew-primary-dark);
    background: var(--ew-primary);
    color: #eef1ff !important;
}

.guest-link-primary:hover {
    background: var(--ew-primary-dark);
}

.guest-content {
    flex: 1;
    width: 100%;
    max-width: var(--ew-content-max);
    margin: 0 auto;
    padding: 1.5rem;
}

.admin-page-shell {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--ew-bg-page);
    max-width: none;
    padding: 0;
}

/* Dashboard home */
.dashboard-home {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dashboard-welcome {
    margin: 0;
}

.dashboard-quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.85rem;
}

.dashboard-link-card {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    text-decoration: none !important;
    color: inherit;
    border: 1px solid var(--ew-border);
    transition: border-color 0.12s ease, background 0.12s ease;
}

.dashboard-link-card:hover {
    border-color: var(--ew-border-strong);
    background: var(--ew-input-bg);
}

.dashboard-link-card strong {
    color: var(--ew-text);
    font-size: 0.9rem;
}

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

@media (min-width: 992px) {
    .app-sidebar {
        position: sticky;
        transform: translateX(0);
        box-shadow: none;
    }

    .app-sidebar-close,
    .app-drawer-backdrop,
    .app-menu-btn {
        display: none;
    }

    .app-search-wrap {
        display: block;
        width: min(240px, 28vw);
    }

    .app-topbar-username {
        max-width: 10rem;
    }
}

@media (max-width: 991px) {
    .app-topbar {
        padding: 0 0.85rem;
    }

    .app-topbar--discover {
        gap: 0.45rem;
    }

    .app-topbar--discover .app-topbar-discover-search-input {
        padding-top: 0.42rem;
        padding-bottom: 0.42rem;
        font-size: 0.875rem;
    }

    .app-topbar-username,
    .app-logout-btn {
        display: none;
    }

    .app-content {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .app-topbar-profile {
        padding: 0.2rem;
        border-radius: 999px;
    }

    .app-topbar-profile .app-topbar-username {
        display: none;
    }
}

/* Home hub menu — legacy guest card styles */
.hub-menu {
    max-width: 520px;
    margin: 0 auto;
    padding-bottom: 1rem;
}

.hub-hero {
    margin-bottom: 1.5rem;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
}

.hub-eyebrow {
    margin: 0 0 0.4rem;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ew-text-muted);
}

.hub-greeting {
    margin: 0 0 0.2rem;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--ew-text);
}

.hub-subtitle {
    margin: 0;
    font-size: 0.875rem;
    color: var(--ew-text-muted);
}

.hub-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.25rem;
}

.hub-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.3rem;
    padding: 0.55rem 0.2rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    box-shadow: none;
    text-decoration: none !important;
    color: inherit;
    transition: background 0.15s ease, color 0.15s ease;
    min-height: 0;
}

.hub-tile:hover,
.hub-tile:focus-visible {
    background: rgba(57, 73, 171, 0.06);
    outline: none;
}

.hub-tile-label {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--ew-text-muted);
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.hub-tile:hover .hub-tile-label,
.hub-tile:focus-visible .hub-tile-label {
    color: var(--ew-primary);
}

.hub-tile-icon {
    font-size: 1.15rem;
    line-height: 1;
    opacity: 0.72;
    filter: grayscale(0.15);
}

.hub-tile:hover .hub-tile-icon,
.hub-tile:focus-visible .hub-tile-icon {
    opacity: 1;
    filter: none;
}

.hub-guest-card {
    max-width: 420px;
    margin: 0 auto;
}

/* Settings page */
.settings-page {
    max-width: 520px;
    margin: 0 auto;
}

.settings-header {
    margin-bottom: 1.25rem;
}

.settings-header h1 {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ew-text);
}

.settings-group {
    margin-bottom: 0.85rem;
    padding: 0;
    overflow: hidden;
}

.settings-group-title {
    margin: 0;
    padding: 0.85rem 1rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ew-text-muted);
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-top: 1px solid var(--ew-border);
    text-decoration: none !important;
    color: inherit;
    transition: background 0.15s ease;
}

.settings-row:hover,
.settings-row:focus-visible {
    background: rgba(57, 73, 171, 0.04);
    outline: none;
}

.settings-row-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: #37474f;
}

.settings-row-chevron {
    font-size: 1.25rem;
    line-height: 1;
    color: var(--ew-text-muted);
}

.settings-account-card {
    padding: 1rem;
}

.settings-signed-in {
    margin: 0 0 0.25rem;
}

/* Page content */
.page-intro {
    margin-bottom: 1.25rem;
    color: #555;
    font-size: 1rem;
    line-height: 1.5;
}

.page-intro--row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-intro-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.discover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.discover-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.discover-search {
    position: relative;
    flex: 1;
    min-width: min(100%, 16rem);
    display: flex;
    align-items: center;
}

.discover-search-icon {
    position: absolute;
    left: 0.75rem;
    width: 1rem;
    height: 1rem;
    color: var(--ew-text-muted);
    pointer-events: none;
}

.discover-search-input {
    width: 100%;
    padding: 0.65rem 2rem 0.65rem 2.35rem;
    border: 1px solid var(--ew-border);
    border-radius: 999px;
    background: var(--ew-surface-raised);
    font-size: 0.9375rem;
    color: var(--ew-text);
    outline: none;
}

.discover-search-input:focus {
    border-color: var(--ew-primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.discover-search-clear {
    position: absolute;
    right: 0.35rem;
    width: 1.75rem;
    height: 1.75rem;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--ew-text-muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.discover-search-clear:hover {
    background: #f0f0f0;
    color: var(--ew-text);
}

.discover-cart-btn {
    flex-shrink: 0;
}

.discover-cart-top {
    position: relative;
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--ew-border);
    color: #444;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.discover-cart-top:hover {
    background: var(--ew-sidebar-active);
    border-color: var(--ew-primary);
    color: var(--ew-primary);
}

.discover-cart-top-icon {
    width: 1.2rem;
    height: 1.2rem;
}

.discover-cart-top-badge {
    position: absolute;
    top: -0.2rem;
    right: -0.2rem;
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.2rem;
    border-radius: 999px;
    background: var(--ew-primary);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1rem;
    text-align: center;
    border: 1.5px solid #fff;
}

.discover-header p {
    margin: 0;
}

.state-card {
    background: var(--ew-surface-raised);
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius);
    padding: 1.1rem 1.15rem;
    box-shadow: var(--ew-shadow);
}

.state-card + .state-card {
    margin-top: 0.75rem;
}

.state-card h2 {
    margin: 0 0 0.65rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--ew-text);
}

.state-card.error,
.error,
.validation-message {
    color: #c62828;
}

/* Events list */
.event-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.event-card {
    background: var(--ew-surface-raised);
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius);
    overflow: hidden;
    box-shadow: none;
    transition: border-color 0.12s ease, background 0.12s ease;
}

.event-card:hover {
    border-color: var(--ew-border-strong);
    background: var(--ew-input-bg);
}

.event-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    background: #b8beca;
}

.event-body {
    padding: 0.9rem 1rem 1rem;
}

.event-body h2 {
    font-size: 0.95rem;
    margin: 0 0 0.35rem;
    color: var(--ew-text);
}

.meta {
    color: var(--ew-text-muted);
    font-size: 0.85rem;
    margin: 0.15rem 0;
}

.event-meta-row {
    display: block;
    margin: 0.2rem 0 0;
}

.event-meta-row:first-of-type {
    margin-top: 0.35rem;
}

.event-date-row {
    color: #555;
}

.price {
    color: var(--ew-primary);
    font-weight: 700;
    font-size: 1rem;
    margin: 0.35rem 0 0;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ew-text-muted);
}

.form-label-block {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ew-text-muted);
}

.account-type-options {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.account-type-option {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius-sm);
    background: var(--ew-surface-raised);
    cursor: pointer;
}

.account-type-option.selected {
    border-color: var(--ew-primary);
    background: #eff6ff;
}

.account-type-option input {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.account-type-option strong {
    display: block;
    font-size: 0.875rem;
    color: var(--ew-text);
}

.account-type-option .meta {
    display: block;
    margin-top: 0.15rem;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.55rem 0.7rem;
    font-size: 0.9375rem;
    border: 1px solid var(--ew-border-strong);
    border-radius: var(--ew-radius-sm);
    background: var(--ew-input-bg);
    color: var(--ew-text);
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--ew-primary);
    box-shadow: 0 0 0 2px rgba(74, 99, 216, 0.2);
}

.btn-primary {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.55rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #eef1ff !important;
    background: var(--ew-primary);
    border: 1px solid var(--ew-primary-dark);
    border-radius: var(--ew-radius-sm);
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.btn-primary:hover:not(:disabled) {
    background: var(--ew-primary-dark);
    border-color: #2f42a0;
}

.btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.demo-login-hint {
    margin-bottom: 1.1rem;
    padding: 0.75rem 0.85rem;
    border-radius: var(--ew-radius-sm);
    background: #f1f5f9;
    border: 1px solid var(--ew-border);
}

.demo-login-hint p {
    margin: 0.25rem 0;
}

.demo-login-hint code {
    font-size: 0.875em;
    color: var(--ew-text);
}

.mock-login-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: 0.65rem;
}

.mock-login-btn {
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius-sm);
    background: #fff;
    color: var(--ew-text);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.55rem 0.65rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.mock-login-btn:hover:not(:disabled) {
    background: #e8f1ff;
    border-color: #93c5fd;
}

.mock-login-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.mock-login-btn--admin:not(:disabled) {
    border-color: #c4b5fd;
    background: #f5f3ff;
}

.mock-login-btn--co-admin:not(:disabled) {
    border-color: #f9a8d4;
    background: #fdf2f8;
}

.mock-login-btn--organiser:not(:disabled) {
    border-color: #86efac;
    background: #f0fdf4;
}

.mock-login-btn--agent:not(:disabled) {
    border-color: #93c5fd;
    background: #eff6ff;
}

.mock-login-btn--student:not(:disabled) {
    border-color: #fcd34d;
    background: #fffbeb;
}

.mock-login-btn--angels:not(:disabled) {
    border-color: #c4b5fd;
    background: #faf5ff;
}

.demo-login-samples {
    margin-top: 0.85rem;
    padding: 0.75rem 0.85rem;
    border: 1px dashed var(--ew-border-strong);
    border-radius: var(--ew-radius-sm);
    background: #fafbfc;
}

.demo-login-samples-title {
    margin: 0 0 0.5rem;
    font-size: 0.875rem;
    color: var(--ew-text-muted);
}

.demo-login-sample {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 0.75rem;
    margin-top: 0.35rem;
}

.demo-login-sample-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ew-text);
    min-width: 6.5rem;
}

.demo-login-sample-value {
    font-size: 0.8125rem;
    word-break: break-all;
}

.mock-login-note {
    margin-top: 0.65rem;
}

.demo-login-hints {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.demo-login-hints .demo-login-hint {
    margin-bottom: 0;
}

.btn-secondary {
    margin-top: 0.55rem;
    padding: 0.42rem 0.8rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ew-text);
    background: var(--ew-surface);
    border: 1px solid var(--ew-border-strong);
    border-radius: var(--ew-radius-sm);
    cursor: pointer;
}

.btn-secondary:hover {
    background: var(--ew-input-bg);
    border-color: var(--ew-primary);
    color: var(--ew-primary-dark);
}

/* Tabs */
.tab-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tab-btn {
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--ew-border-strong);
    border-radius: var(--ew-radius-sm);
    background: var(--ew-surface);
    color: var(--ew-text-muted);
    font-weight: 600;
    font-size: 0.8125rem;
    cursor: pointer;
}

.tab-btn.active {
    background: var(--ew-primary);
    color: #eef1ff;
    border-color: var(--ew-primary-dark);
}

/* Tickets */
.ticket-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ticket-card {
    background: var(--ew-surface);
    border-radius: var(--ew-radius);
    padding: 1rem;
    box-shadow: var(--ew-shadow);
}

.ticket-card h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
}

.ticket-card .price {
    margin: 0.5rem 0 0;
}

.ticket-code {
    font-family: ui-monospace, monospace;
    font-size: 0.8rem;
    word-break: break-all;
}

/* Notifications */
.notification-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.notification-refresh {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.9rem;
    color: var(--ew-primary);
    cursor: pointer;
}

.notification-refresh:disabled {
    opacity: 0.5;
    cursor: default;
}

.notification-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid #e5e5e5;
}

.notification-item {
    padding: 0.85rem 0;
    border-bottom: 1px solid #e5e5e5;
}

.notification-title {
    margin: 0 0 0.2rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #222;
}

.notification-item.unread .notification-title {
    font-weight: 600;
}

.notification-message {
    margin: 0 0 0.3rem;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #444;
}

.notification-time {
    margin: 0;
    font-size: 0.8rem;
}

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

/* Profile */
.profile-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    min-width: 0;
}

.profile-loading,
.profile-guest {
    width: 100%;
    max-width: 28rem;
}

.profile-summary {
    padding: 1rem 1.25rem;
}

.profile-summary-top {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--ew-border, #e2e8f0);
}

.profile-summary-top .profile-name {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 1.15rem;
}

.profile-summary-actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

.profile-info-minimal {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0 0;
}

.profile-info-minimal li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.45rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
}

.profile-info-minimal li:last-child {
    border-bottom: none;
}

.profile-info-label {
    color: var(--ew-muted, #64748b);
    flex-shrink: 0;
}

.profile-info-value {
    color: #0f172a;
    text-align: right;
    word-break: break-word;
}

.profile-info-mono {
    font-family: ui-monospace, monospace;
    font-size: 0.82rem;
}

.profile-hero {
    padding: 1.25rem 1.5rem;
}

.profile-hero-main {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.profile-avatar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.profile-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e2e8f0;
}

.profile-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.profile-edit-page {
    width: 100%;
    min-width: 0;
}

.profile-edit-form .form-control,
.profile-edit-form select,
.profile-edit-form input[type="text"]:not([disabled]) {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.profile-avatar-lg {
    width: 112px;
    height: 112px;
    font-size: 1.75rem;
}

.profile-file-btn {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.profile-file-btn span {
    display: inline-block;
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ew-primary-dark, #1e3a5f);
    background: #f8fafc;
    border: 1px solid var(--ew-border, #e2e8f0);
    border-radius: 6px;
}

.profile-file-btn input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.profile-edit-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.profile-edit-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.profile-back-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}

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

.profile-panel-edit {
    grid-column: 1 / -1;
}

.profile-edit-photo {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    padding-bottom: 1.25rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--ew-border, #e2e8f0);
    width: 100%;
}

.profile-edit-photo-centered {
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.profile-avatar-wrap-center {
    align-items: center;
    margin: 0 auto;
}

.profile-edit-photo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    width: 100%;
}

.profile-edit-photo-hint {
    margin: 0;
    width: 100%;
}

.profile-edit-photo-fields {
    flex: 1;
    min-width: min(100%, 16rem);
}

.profile-edit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.profile-avatar-edit {
    font-size: 0.75rem;
    color: var(--ew-muted, #64748b);
    cursor: pointer;
    text-align: center;
}

.profile-avatar-edit input[type="file"] {
    display: block;
    max-width: 120px;
    font-size: 0.7rem;
    margin-top: 0.15rem;
}

.profile-hero-body {
    flex: 1;
    min-width: 0;
}

.profile-eyebrow {
    margin: 0 0 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ew-muted, #64748b);
}

.profile-name {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.profile-email {
    margin: 0 0 0.75rem;
    color: var(--ew-muted, #64748b);
    font-size: 0.95rem;
}

.profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.profile-role-badge,
.profile-id-badge,
.profile-count-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}

.profile-role-badge {
    background: #dbeafe;
    color: #1e40af;
}

.profile-id-badge {
    background: #f1f5f9;
    color: #475569;
}

.profile-count-badge {
    background: #e2e8f0;
    color: #334155;
    min-width: 1.75rem;
    text-align: center;
}

.profile-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--ew-border, #e2e8f0);
}

.profile-inline-msg {
    margin: 0.75rem 0 0;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    gap: 1rem;
    width: 100%;
}

.profile-panel-wide {
    grid-column: 1 / -1;
}

.profile-panel {
    padding: 1.25rem 1.5rem;
}

.profile-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.profile-panel-head h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.profile-panel-sub {
    margin: 0.25rem 0 0;
}

.profile-panel-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    white-space: nowrap;
}

.profile-panel-link:hover {
    text-decoration: underline;
}

.profile-details {
    margin: 0;
}

.profile-detail-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--ew-border, #e2e8f0);
}

.profile-detail-row:last-child {
    border-bottom: none;
}

.profile-detail-row dt {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ew-muted, #64748b);
}

.profile-detail-row dd {
    margin: 0;
    font-size: 0.95rem;
    color: #0f172a;
}

.profile-code {
    font-size: 0.85rem;
    background: #f8fafc;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    border: 1px solid var(--ew-border, #e2e8f0);
}

.profile-edit-form {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.profile-wallet-balance {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.35rem;
}

.profile-wallet-btn {
    margin-top: 1rem;
}

.profile-empty-state {
    padding: 1rem;
    background: #f8fafc;
    border: 1px dashed var(--ew-border, #cbd5e1);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.profile-empty-state p {
    margin: 0 0 0.35rem;
}

.profile-empty-state p:last-child {
    margin-bottom: 0;
}

.profile-children-grid {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.profile-child-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border: 1px solid var(--ew-border, #e2e8f0);
    border-radius: 8px;
}

.profile-child-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.profile-child-main strong {
    display: block;
    font-size: 0.95rem;
}

.profile-child-initial {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #dbeafe;
    color: #1e40af;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-child-actions {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

.profile-child-edit {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-child-edit-actions {
    display: flex;
    gap: 0.35rem;
}

.profile-add-child {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.profile-add-child .form-control {
    flex: 1;
}

.profile-setup-notice {
    padding: 1rem 1.1rem;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 8px;
}

.profile-setup-notice strong {
    display: block;
    margin-bottom: 0.35rem;
    color: #92400e;
}

.profile-setup-code {
    display: block;
    margin: 0.5rem 0;
    padding: 0.5rem 0.65rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.85rem;
}

@media (max-width: 720px) {
    .profile-hero-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-badges {
        justify-content: center;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }

    .profile-detail-row {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .profile-child-card {
        flex-direction: column;
        align-items: stretch;
    }

    .profile-child-actions {
        justify-content: flex-end;
    }

    .profile-add-child {
        flex-direction: column;
        align-items: stretch;
    }
}

.profile-card {
    text-align: center;
}

.profile-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.profile-photo-upload {
    margin-bottom: 0.75rem;
}

.profile-photo-upload input[type="file"] {
    font-size: 0.85rem;
    max-width: 100%;
}

.signin-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0 1rem;
    color: var(--ew-muted, #6b7280);
    font-size: 0.85rem;
}

.signin-divider::before,
.signin-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--ew-border, #e5e7eb);
}

.google-signin-btn {
    display: flex;
    justify-content: center;
}

/* Wallet */
.wallet-card .price {
    font-size: 1.5rem;
    margin: 0.25rem 0 0.75rem;
}

.wallet-txn-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.5rem;
}

.wallet-txn-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--ew-border);
}

.txn-credit {
    color: #2e7d32;
    font-weight: 700;
}

.txn-debit {
    color: #c62828;
    font-weight: 700;
}

.wallet-phase-note {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    font-style: italic;
}

/* Checkout */
.discover-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
}

.checkout-lines {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0;
}

.checkout-line {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.75rem;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--ew-border);
}

.checkout-qty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkout-line-total {
    font-weight: 600;
    white-space: nowrap;
}

.checkout-line-stacked {
    grid-template-columns: 1fr;
    align-items: stretch;
}

.checkout-child-select {
    margin: 0;
}

.checkout-hint {
    margin: 0 0 0.5rem;
}

.checkout-child-slots {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.child-name-row,
.child-add-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.child-name-row .form-control,
.child-add-row .form-control {
    flex: 1;
}

.children-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.children-list-item {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--ew-border);
}

.badge-verified,
.badge-pending {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
}

.badge-verified {
    background: #dcfce7;
    color: #166534;
}

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

.checkout-totals {
    margin: 1rem 0;
    padding-top: 0.75rem;
    border-top: 1px solid var(--ew-border);
}

.checkout-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.35rem;
}

.checkout-total-row.discount {
    color: #2e7d32;
}

.checkout-total-row.total {
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.status-paid {
    color: #2e7d32;
    font-weight: 600;
}

.status-pending {
    color: #ed6c02;
    font-weight: 600;
}

.status-failed {
    color: #c62828;
    font-weight: 600;
}

.wallet-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.admin-login-card h2 {
    color: var(--ew-primary);
}

.admin-demo-hint {
    background: #fff3e0;
    border-color: #ffcc80;
}

.app-content--admin {
    max-width: none;
    width: 100%;
    min-width: 0;
    overflow-x: clip;
}

.app-sidebar-back {
    display: block;
    margin-top: 0.65rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ew-primary);
    text-decoration: none;
}

.app-sidebar-back:hover {
    text-decoration: underline;
}

@media (min-width: 992px) {
    .app-shell--admin .app-sidebar-back {
        display: none;
    }
}

.app-content--admin .state-card,
.app-content--admin .attendance-panel,
.app-content--admin .admin-events-panel {
    margin-bottom: 1rem;
}

/* Admin Events tab — dense mobile layout */
.app-shell--events-admin .app-topbar {
    min-height: 56px;
    height: 56px;
    padding: 0 12px;
    gap: 0.5rem;
}

.app-shell--events-admin .app-page-title {
    font-size: clamp(1.125rem, 4.5vw, 1.75rem);
    font-weight: 700;
    line-height: 1.2;
}

.app-content--events-admin {
    padding: 12px;
}

.app-content--events-admin .admin-events-page {
    gap: 0.75rem;
}

.app-content--events-admin .admin-events-panel {
    margin-bottom: 0;
}

@media (min-width: 992px) {
    .app-content--events-admin {
        padding: 12px 16px;
    }
}

.sp-referral-share-card {
    margin-bottom: 0.75rem;
}

.sp-referral-share-card .sp-profile-section-label {
    margin: 0 0 0.35rem;
}

.admin-settings-panel {
    background: var(--ew-surface);
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius);
    padding: 1.15rem 1.25rem;
    box-shadow: var(--ew-shadow);
}

.admin-settings-panel h2 {
    margin: 0 0 0.25rem;
}

.admin-settings-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.5rem;
}

.admin-settings-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.95rem 1rem;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius-sm);
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.admin-settings-card:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.admin-settings-card-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 10px;
    background: #ede9fe;
    color: #5b21b6;
    font-size: 0.68rem;
    font-weight: 700;
    flex-shrink: 0;
}

.admin-settings-card-body {
    flex: 1;
    min-width: 0;
}

.admin-settings-card-title {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
}

.admin-settings-card-body .meta {
    margin: 0;
    font-size: 0.8rem;
}

.admin-settings-card-chevron {
    font-size: 1.35rem;
    line-height: 1;
    color: #94a3b8;
    flex-shrink: 0;
}

.admin-settings-card--active {
    border-color: #2563eb;
    background: #eff6ff;
}

.admin-membership-plan-card + .admin-membership-plan-card {
    margin-top: 1rem;
}

.admin-membership-plan-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.admin-membership-plan-head-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

.admin-membership-plans-header {
    align-items: center;
    gap: 1rem;
    margin: 0;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--ew-border, #e2e8f0);
}

.admin-membership-plans-header h2 {
    margin: 0 0 0.15rem;
    font-size: 1.05rem;
}

.admin-membership-plans-header .meta {
    margin: 0;
}

.admin-membership-plans-header .btn-primary,
.admin-membership-plans-header .btn-secondary {
    flex-shrink: 0;
}

.admin-membership-plans-header__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.admin-membership-section-menu {
    position: relative;
}

.admin-membership-section-menu > summary {
    list-style: none;
}

.admin-membership-section-menu > summary::-webkit-details-marker {
    display: none;
}

.admin-membership-section-menu__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    cursor: pointer;
}

.admin-membership-section-menu__btn:hover {
    border-color: #93c5fd;
    color: #1d4ed8;
    background: #f8fafc;
}

.admin-membership-section-menu[open] .admin-membership-section-menu__btn {
    border-color: #93c5fd;
    color: #1d4ed8;
    background: #eff6ff;
}

.admin-membership-section-menu__dots {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.admin-membership-section-menu__dots span {
    display: block;
    width: 3px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
}

.admin-membership-section-menu__panel {
    position: absolute;
    top: calc(100% + 0.3rem);
    right: 0;
    z-index: 20;
    min-width: 11.5rem;
    padding: 0.3rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

.admin-membership-section-menu__item {
    display: block;
    padding: 0.55rem 0.7rem;
    border-radius: 7px;
    color: #334155;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
}

.admin-membership-section-menu__item:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.admin-membership-section-menu__item.is-active {
    background: #eff6ff;
    color: #1d4ed8;
}

.admin-membership-plans,
.admin-membership-active {
    min-width: 0;
    max-width: 100%;
}

.admin-membership-plans-card {
    border: 1px solid var(--ew-border, #e2e8f0);
    border-radius: var(--ew-radius-sm, 10px);
    background: #fff;
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
}

.admin-membership-plans-card__msg {
    margin: 0;
    padding: 0.65rem 1rem 0;
}

.admin-membership-plans-card__empty {
    padding: 1.25rem 1rem 1.35rem;
}

.admin-membership-plans-card .admin-membership-plans-table-wrap {
    margin: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.admin-membership-plans-card .admin-table {
    width: 100%;
    min-width: 34rem;
}

@media (max-width: 720px) {
    .admin-membership-plans-header {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .admin-membership-plans-header > div:first-child {
        min-width: 0;
        flex: 1 1 12rem;
    }

    .admin-membership-plans-header__actions {
        margin-left: auto;
    }

    .admin-membership-plans-table th:nth-child(2),
    .admin-membership-plans-table td:nth-child(2) {
        display: none;
    }

    .admin-membership-plans-card .admin-table {
        min-width: 28rem;
    }
}

.admin-membership-plan-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.75rem;
}

.admin-membership-plan-card--create {
    border-color: #2563eb;
    margin-bottom: 1rem;
}

.admin-management-layout {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-width: 0;
    max-width: 100%;
}

.admin-users-page-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    min-width: 0;
}

.admin-approvals-page-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    min-width: 0;
}

.admin-shell-page-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    min-width: 0;
}

.admin-settings-page-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    min-width: 0;
}

.admin-forum-page-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    min-width: 0;
}

.admin-users-page-main {
    min-width: 0;
}

.admin-approvals-page-main {
    min-width: 0;
}

.admin-shell-page-main {
    min-width: 0;
}

.admin-settings-page-main {
    min-width: 0;
}

.admin-forum-page-main {
    min-width: 0;
}

@media (min-width: 992px) {
    .admin-users-page-layout {
        grid-template-columns: minmax(0, 1fr) 10.5rem;
        gap: 1rem;
        align-items: start;
    }

    .admin-approvals-page-layout {
        grid-template-columns: minmax(0, 1fr) 12.5rem;
        gap: 1rem;
        align-items: start;
    }

    .admin-settings-page-layout {
        grid-template-columns: minmax(0, 1fr) 12.5rem;
        gap: 1rem;
        align-items: start;
    }

    .admin-shell-page-layout {
        grid-template-columns: 12.5rem minmax(0, 1fr);
        gap: 1rem;
        align-items: start;
    }

    .admin-forum-page-layout {
        grid-template-columns: minmax(0, 1fr) 12.5rem;
        gap: 1rem;
        align-items: start;
    }
}

.admin-segment-tabs--nested {
    margin-top: -0.15rem;
}

.admin-segment-tabs--settings {
    margin-bottom: 1rem;
}

.admin-settings-explore-nav {
    min-width: 0;
    align-self: start;
}

.admin-settings-explore-nav-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    left: 0;
    top: 50%;
    z-index: 210;
    transform: translateY(-50%);
    min-height: 6.5rem;
    padding: 0.65rem 0.45rem;
    border: 1px solid var(--ew-border);
    border-left: none;
    border-radius: 0 8px 8px 0;
    background: var(--ew-surface-raised, #fff);
    color: var(--ew-text);
    font: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 2px 0 12px rgba(15, 23, 42, 0.08);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transition: left 0.22s ease, opacity 0.18s ease, transform 0.22s ease, background 0.18s ease;
}

.admin-settings-explore-nav-tab--open {
    left: min(82vw, 260px);
    writing-mode: horizontal-tb;
    min-height: auto;
    min-width: 2rem;
    padding: 0.55rem 0.35rem;
    background: rgba(74, 99, 216, 0.1);
    color: var(--ew-primary);
    border-color: rgba(74, 99, 216, 0.25);
}

.admin-settings-explore-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 200;
    margin: 0;
    padding: 0;
    border: none;
    background: rgba(15, 23, 42, 0.4);
    cursor: pointer;
}

.admin-settings-explore-nav-panel {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 205;
    display: flex;
    flex-direction: column;
    width: min(82vw, 260px);
    margin: 0;
    padding: 0 0.85rem 1.5rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--ew-surface-raised, #fff);
    border-right: 1px solid var(--ew-border);
    box-shadow: 8px 0 32px rgba(15, 23, 42, 0.12);
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    visibility: hidden;
    pointer-events: none;
}

.admin-settings-explore-nav-panel--open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

.admin-settings-explore-nav-panel-head {
    position: sticky;
    top: 0;
    z-index: 1;
    margin: 0 -0.85rem 0.75rem;
    padding: 0.85rem 0.85rem 0.65rem;
    background: var(--ew-surface-raised, #fff);
    border-bottom: 1px solid var(--ew-border);
}

.admin-settings-explore-nav-panel-close {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    margin: 0 0 0.55rem;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--ew-primary);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

.admin-settings-explore-nav-panel-close:hover {
    color: var(--ew-primary-dark);
}

.admin-settings-explore-nav-panel-close-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    background: rgba(74, 99, 216, 0.08);
    font-size: 1.1rem;
    line-height: 1;
}

.admin-settings-explore-nav-panel-title {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.admin-settings-explore-nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.admin-settings-explore-nav-link {
    display: block;
    padding: 0.6rem 0.75rem;
    border-radius: var(--ew-radius-sm);
    color: #334155;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.35;
}

.admin-settings-explore-nav-link:hover {
    background: #f1f5f9;
    color: var(--ew-primary-dark);
}

.admin-settings-explore-nav-link--active {
    background: rgba(74, 99, 216, 0.08);
    color: var(--ew-primary);
    font-weight: 600;
}

.admin-settings-explore-nav-sidebar {
    display: none;
}

@media (min-width: 992px) {
    .admin-settings-explore-nav-tab,
    .admin-settings-explore-nav-backdrop,
    .admin-settings-explore-nav-panel {
        display: none !important;
    }

    .admin-settings-explore-nav-sidebar {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        position: sticky;
        top: 1rem;
        align-self: start;
        padding: 0.85rem 0.75rem;
        border: 1px solid var(--ew-border);
        border-radius: var(--ew-radius-sm);
        background: #fff;
        box-shadow: var(--ew-shadow);
    }

    .admin-settings-explore-nav-sidebar-title {
        margin: 0 0 0.5rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid var(--ew-border);
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: #64748b;
    }

    .admin-settings-explore-nav-sidebar-link {
        display: block;
        padding: 0.55rem 0.65rem;
        border-radius: var(--ew-radius-sm);
        color: #64748b;
        text-decoration: none;
        font-size: 0.8125rem;
        font-weight: 500;
        line-height: 1.35;
    }

    .admin-settings-explore-nav-sidebar-link:hover {
        background: #f8fafc;
        color: var(--ew-primary-dark);
    }

    .admin-settings-explore-nav-sidebar-link--active {
        background: rgba(74, 99, 216, 0.08);
        color: var(--ew-primary);
        font-weight: 600;
    }
}

.admin-membership-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-membership-count {
    margin: 0 0 0.75rem;
}

.admin-membership-empty {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
}

.admin-membership-back {
    margin-bottom: 0.25rem;
}

.admin-membership-plans-table-wrap {
    margin-top: 0;
}

.admin-membership-plans-table th,
.admin-membership-plans-table td {
    padding: 0.55rem 0.75rem;
}

.admin-membership-plans-table__plan {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 12rem;
}

.admin-membership-plans-table__plan strong {
    font-size: 0.92rem;
    font-weight: 650;
    color: #0f172a;
}

.admin-membership-plans-table__code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.72rem;
    color: #64748b;
}

.admin-membership-plans-table__schedule {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.65rem;
    margin-top: 0.1rem;
    font-size: 0.72rem;
    color: #94a3b8;
}

.admin-membership-plans-table__price {
    white-space: nowrap;
}

.admin-membership-plans-table__price strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
}

.admin-membership-plans-table__price span {
    display: block;
    font-size: 0.72rem;
    color: #64748b;
}

.admin-membership-plans-table__active {
    margin: 0;
}

.admin-membership-plans-table__saving {
    display: inline-block;
    margin-left: 0.35rem;
    font-size: 0.72rem;
}

.admin-membership-plans-table__actions-col,
.admin-membership-plans-table__actions {
    width: 1%;
    white-space: nowrap;
    text-align: right;
}

.admin-membership-plans-table__row--inactive td {
    color: #64748b;
    background: #fafbfc;
}

.admin-membership-plans-table__row--inactive .admin-membership-plans-table__plan strong {
    color: #64748b;
}

.admin-membership-catalogue {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.admin-membership-catalogue--rows {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.admin-membership-catalogue-cols {
    display: none;
    grid-template-columns: minmax(0, 1.6fr) 7.5rem 7rem 5.5rem;
    gap: 0.85rem 1rem;
    padding: 0.55rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admin-membership-catalogue-cols span:nth-child(2),
.admin-membership-catalogue-cols span:nth-child(3),
.admin-membership-catalogue-cols span:nth-child(4) {
    text-align: right;
}

.admin-membership-catalogue-row {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) 7.5rem 7rem 5.5rem;
    align-items: center;
    gap: 0.85rem 1rem;
    padding: 0.9rem 1rem;
    border: none;
    border-bottom: 1px solid #eef2f7;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    border-left: 3px solid transparent;
}

.admin-membership-catalogue-row:last-child {
    border-bottom: none;
}

.admin-membership-catalogue-row:hover {
    background: #f8fafc;
}

.admin-membership-catalogue-row .admin-membership-catalogue-mark {
    width: 2rem;
    height: 2rem;
    font-size: 0.78rem;
    flex-shrink: 0;
}

.admin-membership-catalogue-row.admin-membership-catalogue-card--vip {
    border-color: transparent;
    border-left-color: #8b5cf6;
    background: #fff;
}

.admin-membership-catalogue-row.admin-membership-catalogue-card--angels {
    border-color: transparent;
    border-left-color: #3b82f6;
    background: #fff;
}

.admin-membership-catalogue-row.admin-membership-catalogue-card--activity {
    border-color: transparent;
    border-left-color: #10b981;
    background: #fff;
}

.admin-membership-catalogue-row--inactive {
    opacity: 0.72;
    background: #fafbfc;
}

.admin-membership-catalogue-row__identity {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}

.admin-membership-catalogue-row__text {
    min-width: 0;
}

.admin-membership-catalogue-row__title-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.admin-membership-catalogue-row .admin-membership-catalogue-title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f172a;
}

.admin-membership-catalogue-row .admin-membership-catalogue-code {
    margin: 0.12rem 0 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.75rem;
}

.admin-membership-catalogue-row .admin-membership-catalogue-schedule {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    margin: 0.25rem 0 0;
}

.admin-membership-catalogue-row .admin-membership-catalogue-price {
    justify-self: end;
    text-align: right;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
}

.admin-membership-catalogue-row .admin-membership-catalogue-amount {
    font-size: 1.05rem;
}

.admin-membership-catalogue-row .admin-membership-catalogue-active {
    margin: 0;
    justify-self: end;
    white-space: nowrap;
    font-size: 0.8125rem;
}

.admin-membership-catalogue-row .admin-membership-catalogue-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.4rem;
    margin: 0;
}

.admin-membership-catalogue-row .admin-membership-catalogue-view {
    align-self: center;
    min-width: 4.5rem;
    text-align: center;
}

.admin-membership-type-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

@media (min-width: 901px) {
    .admin-membership-catalogue-cols {
        display: grid;
    }
}

@media (max-width: 900px) {
    .admin-membership-catalogue-row {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "identity price"
            "active actions";
    }

    .admin-membership-catalogue-row__identity {
        grid-area: identity;
    }

    .admin-membership-catalogue-row .admin-membership-catalogue-price {
        grid-area: price;
        justify-self: end;
    }

    .admin-membership-catalogue-row .admin-membership-catalogue-active {
        grid-area: active;
        justify-self: start;
        align-self: center;
    }

    .admin-membership-catalogue-row .admin-membership-catalogue-actions {
        grid-area: actions;
    }
}

@media (max-width: 560px) {
    .admin-membership-catalogue-row {
        grid-template-columns: 1fr;
        grid-template-areas:
            "identity"
            "price"
            "active"
            "actions";
    }

    .admin-membership-catalogue-row .admin-membership-catalogue-price {
        justify-self: start;
        align-items: flex-start;
        text-align: left;
    }

    .admin-membership-catalogue-row .admin-membership-catalogue-actions {
        justify-content: stretch;
    }

    .admin-membership-catalogue-row .admin-membership-catalogue-actions .btn-sm {
        flex: 1 1 auto;
    }
}

.admin-membership-catalogue-card {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-height: 100%;
    padding: 1rem 1.05rem;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.admin-membership-catalogue-card--vip {
    border-color: #c4b5fd;
    background: linear-gradient(180deg, #faf5ff 0%, #f5f3ff 100%);
}

.admin-membership-catalogue-card--angels {
    border-color: #93c5fd;
    background: linear-gradient(180deg, #eff6ff 0%, #f0f9ff 100%);
}

.admin-membership-catalogue-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.admin-membership-catalogue-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    font-size: 1rem;
}

.admin-membership-catalogue-card--vip .admin-membership-catalogue-mark {
    background: rgba(124, 58, 237, 0.12);
    color: #6d28d9;
}

.admin-membership-catalogue-card--angels .admin-membership-catalogue-mark {
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
}

.admin-membership-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.admin-membership-status-pill--active {
    background: #dcfce7;
    color: #166534;
}

.admin-membership-status-pill--inactive {
    background: #fee2e2;
    color: #991b1b;
}

.admin-membership-catalogue-title {
    margin: 0;
    font-size: 1.12rem;
    line-height: 1.25;
}

.admin-membership-catalogue-code {
    margin: -0.35rem 0 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
}

.admin-membership-catalogue-price {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.admin-membership-catalogue-amount {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
}

.admin-membership-catalogue-period {
    font-size: 0.88rem;
    color: #64748b;
}

.admin-membership-catalogue-desc {
    margin: 0;
    color: #475569;
    line-height: 1.45;
}

.admin-membership-catalogue-perks {
    margin: 0;
    padding-left: 1rem;
    flex: 1;
}

.admin-membership-catalogue-perks li {
    margin-bottom: 0.25rem;
}

.admin-membership-catalogue-perks-empty {
    list-style: none;
    margin-left: -1rem;
    color: #94a3b8;
}

.admin-membership-catalogue-view {
    align-self: flex-start;
}

.admin-membership-catalogue-card--inactive {
    opacity: 0.82;
}

.admin-membership-catalogue-active {
    margin: 0.75rem 0 0.85rem;
    font-size: 0.9rem;
}

.admin-membership-catalogue-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.admin-membership-detail-card {
    margin-top: 0.25rem;
}

.admin-membership-detail-card--vip {
    border-color: #c4b5fd;
}

.admin-membership-detail-card--angels {
    border-color: #93c5fd;
}

.admin-membership-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid #e2e8f0;
}

.admin-membership-detail-eyebrow {
    margin: 0 0 0.2rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.admin-membership-detail-head h2 {
    margin: 0;
}

.admin-membership-detail-head-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

.admin-segment-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-segment-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    color: #334155;
    text-decoration: none;
    font-size: 0.92rem;
}

.admin-segment-tab:hover {
    border-color: #2563eb;
    color: #1d4ed8;
}

.admin-segment-tab--active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.admin-membership-plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem 1rem;
}

.admin-membership-details-block {
    margin: 1rem 0 1.25rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
}

.admin-membership-details-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.admin-membership-details-hint {
    margin: 0 0 0.75rem;
}

.admin-membership-details-grid {
    display: grid;
    gap: 0.65rem;
}

.admin-membership-detail-row label {
    font-size: 0.85rem;
    color: #64748b;
}

.admin-membership-expiry-mode {
    min-width: 8rem;
    margin-bottom: 0.35rem;
}

.admin-membership-expiry-date {
    min-width: 10rem;
}

.admin-save-ok {
    color: #15803d;
}

.memberships-page {
    max-width: 920px;
    margin: 0 auto;
    padding: 0 0 2.5rem;
}

.memberships-hero-banner {
    position: relative;
    margin: -1rem -1.15rem 1.35rem;
    padding: 1.65rem 1.15rem 1.75rem;
    overflow: hidden;
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 55%, #334155 100%);
    color: #f8fafc;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.memberships-hero-banner--compact {
    padding: 0.85rem 1.15rem 0.95rem;
    margin-bottom: 0.65rem;
}

.memberships-hero-banner--compact .memberships-eyebrow {
    margin-bottom: 0.3rem;
    font-size: 0.62rem;
}

.memberships-hero-banner--compact .memberships-headline {
    margin-bottom: 0.25rem;
    font-size: clamp(1.15rem, 3.6vw, 1.45rem);
}

.memberships-hero-banner--compact .memberships-lede {
    font-size: 0.82rem;
    line-height: 1.4;
}

.memberships-hero-banner--vip,
.membership-hero-banner--vip {
    background: linear-gradient(145deg, #0c0a09 0%, #1c1917 45%, #292524 100%);
}

.memberships-hero-banner--angels,
.membership-hero-banner--angels {
    background: linear-gradient(145deg, #1e1b4b 0%, #312e81 50%, #3730a3 100%);
}

.memberships-hero-banner-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(48px);
    pointer-events: none;
    opacity: 0.35;
}

.memberships-hero-banner-glow--1 {
    width: 180px;
    height: 180px;
    top: -60px;
    right: -40px;
    background: #fbbf24;
}

.memberships-hero-banner-glow--2 {
    width: 120px;
    height: 120px;
    bottom: -40px;
    left: 10%;
    background: #60a5fa;
}

.memberships-hero-banner--angels .memberships-hero-banner-glow--1,
.membership-hero-banner--angels .memberships-hero-banner-glow--1 {
    background: #c4b5fd;
}

.memberships-hero-banner--angels .memberships-hero-banner-glow--2,
.membership-hero-banner--angels .memberships-hero-banner-glow--2 {
    background: #818cf8;
}

.memberships-hero-banner-inner {
    position: relative;
    z-index: 1;
    max-width: 36rem;
}

.memberships-eyebrow {
    margin: 0 0 0.5rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(251, 191, 36, 0.92);
}

.memberships-hero-banner--angels .memberships-eyebrow,
.membership-hero-banner--angels .memberships-eyebrow {
    color: rgba(216, 180, 254, 0.95);
}

.memberships-headline {
    margin: 0 0 0.5rem;
    font-size: clamp(1.35rem, 4.2vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.15;
    color: #fff;
}

.memberships-lede {
    margin: 0;
    max-width: 32rem;
    font-size: 0.9rem;
    line-height: 1.55;
    color: rgba(248, 250, 252, 0.78);
}

.memberships-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    padding: 0 0.75rem;
}

.memberships-carousel-wrap {
    padding: 0 0.35rem 0.35rem;
}

.memberships-carousel-step {
    margin: 0 0 0.75rem;
    text-align: center;
    color: rgba(248, 250, 252, 0.72);
    font-size: 0.85rem;
}

.memberships-carousel {
    position: relative;
}

.memberships-carousel-viewport {
    width: 100%;
    overflow: hidden;
}

.memberships-carousel-track {
    display: flex;
    transition: transform 0.32s ease;
}

.memberships-carousel-track--instant {
    transition: none;
}

.memberships-carousel-slide {
    flex: 0 0 100%;
    min-width: 0;
    padding: 0;
    box-sizing: border-box;
}

.memberships-carousel-slide .membership-premium-card {
    width: 100%;
    max-width: none;
    margin: 0;
    height: clamp(28rem, calc(100dvh - 10.5rem), 44rem);
    min-height: clamp(28rem, calc(100dvh - 10.5rem), 44rem);
    max-height: clamp(28rem, calc(100dvh - 10.5rem), 44rem);
    display: flex;
    flex-direction: column;
}

.memberships-carousel-slide .membership-premium-card-body {
    flex: 1;
    min-height: 0;
}

.memberships-carousel-slide .membership-premium-desc {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    margin-bottom: 0.85rem;
    padding-right: 0.2rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.memberships-carousel-slide .membership-premium-desc::-webkit-scrollbar {
    width: 4px;
}

.memberships-carousel-slide .membership-premium-desc::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
}

.memberships-carousel-slide .membership-premium-desc .membership-premium-tagline {
    margin-bottom: 0.85rem;
}

.memberships-carousel-slide .membership-premium-desc .membership-premium-perks {
    margin-bottom: 0;
    flex: none;
}

.memberships-carousel-slide .membership-premium-desc .membership-premium-age-note,
.memberships-carousel-slide .membership-premium-desc .membership-premium-blocked {
    margin-top: 0.85rem;
    margin-bottom: 0;
}

.memberships-carousel-slide .membership-premium-card-actions {
    flex-shrink: 0;
    margin-top: auto;
}

.memberships-carousel-nav {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(248, 250, 252, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #f8fafc;
    font-size: 1.45rem;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.35);
    transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.memberships-carousel-nav--prev {
    left: 0.5rem;
}

.memberships-carousel-nav--next {
    right: 0.5rem;
}

.memberships-carousel-nav:hover:not(:disabled) {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(248, 250, 252, 0.35);
}

.memberships-carousel-nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

@media (min-width: 992px) {
    .memberships-carousel-wrap {
        padding: 0 0.75rem 1rem;
        max-width: 1200px;
        margin: 0 auto;
    }

    .memberships-carousel-step,
    .memberships-carousel-nav {
        display: none;
    }

    .memberships-carousel-viewport {
        overflow: visible;
    }

    .memberships-carousel-track {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.25rem;
        transform: none !important;
        transition: none;
    }

    .memberships-carousel-slide {
        flex: none;
        width: auto;
    }

    .memberships-carousel-slide .membership-premium-card {
        height: auto;
        min-height: 420px;
        max-height: none;
    }

    .memberships-carousel-slide .membership-premium-desc {
        overflow: visible;
        flex: none;
        padding-right: 0;
    }
}

.membership-premium-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    min-height: 420px;
    box-shadow:
        0 24px 48px rgba(15, 23, 42, 0.14),
        0 4px 12px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.membership-premium-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 32px 56px rgba(15, 23, 42, 0.18),
        0 8px 16px rgba(15, 23, 42, 0.08);
}

.membership-premium-card--vip {
    background: linear-gradient(155deg, #0c0a09 0%, #1c1917 38%, #292524 100%);
    color: #fafaf9;
}

.membership-premium-card--angels {
    background: linear-gradient(155deg, #1e1b4b 0%, #312e81 42%, #4338ca 100%);
    color: #f5f3ff;
}

.membership-premium-card--activity {
    background: linear-gradient(155deg, #064e3b 0%, #047857 42%, #10b981 100%);
    color: #ecfdf5;
}

.membership-hero-banner--activity {
    background: linear-gradient(135deg, #064e3b 0%, #059669 100%);
}

.membership-premium-offer-badge {
    display: inline-block;
    margin: 0.35rem 0 0.5rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.2);
    color: #fef3c7;
    font-size: 0.82rem;
    font-weight: 600;
}

.membership-premium-activity-start {
    margin: 0 0 0.75rem;
    font-size: 0.88rem;
    opacity: 0.92;
}

.admin-membership-catalogue-card--activity {
    border-color: #6ee7b7;
    background: linear-gradient(160deg, #ecfdf5 0%, #fff 55%);
}

.admin-membership-catalogue-schedule {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin: 0.35rem 0 0.75rem;
    font-size: 0.78rem;
}

.admin-membership-schedule-block {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--ew-border, #e5e7eb);
}

.admin-a365-batches {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-a365-create {
    padding: 1rem 1.15rem;
}

.admin-a365-enroll {
    padding: 1rem 1.15rem;
}

.admin-a365-create h3,
.admin-a365-enroll h3,
.admin-a365-batch-head h3 {
    margin: 0 0 0.35rem;
}

.admin-a365-create-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) auto;
    gap: 0.85rem;
    align-items: end;
}

.admin-a365-enroll-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.9fr);
    gap: 0.85rem;
    align-items: end;
    margin-bottom: 0.85rem;
}

.admin-a365-enroll-search-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.admin-a365-enroll-search-row .form-control {
    flex: 1;
}

.admin-a365-row-selected td {
    background: rgba(37, 99, 235, 0.06);
}

.admin-a365-create-actions {
    display: flex;
    justify-content: flex-end;
}

.admin-a365-batch-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.admin-a365-batch-card {
    padding: 1rem 1.15rem;
}

.admin-a365-batch-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.admin-a365-student-name {
    font-weight: 600;
}

.admin-a365-assign-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.admin-a365-assign-row .form-control {
    min-width: 10rem;
}

@media (max-width: 820px) {
    .admin-a365-create-grid,
    .admin-a365-enroll-grid {
        grid-template-columns: 1fr;
    }

    .admin-a365-enroll-search-row,
    .admin-a365-batch-head,
    .admin-a365-assign-row {
        flex-direction: column;
        align-items: stretch;
    }
}

.membership-premium-card-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        125deg,
        rgba(255, 255, 255, 0.16) 0%,
        transparent 42%,
        transparent 58%,
        rgba(255, 255, 255, 0.06) 100%
    );
    pointer-events: none;
}

.membership-premium-card-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.45;
    pointer-events: none;
}

.membership-premium-card-orb--1 {
    width: 140px;
    height: 140px;
    top: -30px;
    right: -20px;
}

.membership-premium-card-orb--2 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: -20px;
}

.membership-premium-card--vip .membership-premium-card-orb--1 {
    background: #fbbf24;
}

.membership-premium-card--vip .membership-premium-card-orb--2 {
    background: #f59e0b;
}

.membership-premium-card--angels .membership-premium-card-orb--1 {
    background: #c4b5fd;
}

.membership-premium-card--angels .membership-premium-card-orb--2 {
    background: #818cf8;
}

.membership-premium-card-body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    height: 100%;
    padding: 1.85rem 2rem 1.65rem;
}

.membership-premium-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.membership-premium-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    font-size: 1.15rem;
    line-height: 1;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.membership-premium-tier {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.82;
}

.membership-premium-title {
    margin: 0 0 0.45rem;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.membership-premium-tagline {
    margin: 0 0 1.15rem;
    font-size: 0.92rem;
    line-height: 1.5;
    opacity: 0.88;
}

.membership-premium-perks {
    list-style: none;
    margin: 0 0 1.35rem;
    padding: 0;
    flex: 1;
}

.membership-premium-perks li {
    position: relative;
    padding: 0.42rem 0 0.42rem 1.35rem;
    font-size: 0.88rem;
    line-height: 1.45;
    opacity: 0.92;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.membership-premium-perks li:last-child {
    border-bottom: none;
}

.membership-premium-perks li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0.45rem;
    font-size: 0.75rem;
    font-weight: 700;
    opacity: 0.75;
}

.membership-premium-price-row {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.membership-premium-price {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
}

.membership-premium-card--vip .membership-premium-price {
    background: linear-gradient(135deg, #fde68a 0%, #fbbf24 55%, #f59e0b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.membership-premium-card--angels .membership-premium-price {
    color: #e9d5ff;
}

.membership-premium-period {
    font-size: 0.82rem;
    opacity: 0.72;
    text-transform: lowercase;
}

.membership-premium-cta {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0.9rem 1.25rem;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.membership-premium-card--vip .membership-premium-cta {
    background: linear-gradient(135deg, #fde68a 0%, #fbbf24 45%, #d97706 100%);
    color: #1c1917;
    box-shadow: 0 8px 24px rgba(251, 191, 36, 0.35);
}

.membership-premium-card--angels .membership-premium-cta {
    background: linear-gradient(135deg, #f5f3ff 0%, #ddd6fe 55%, #c4b5fd 100%);
    color: #312e81;
    box-shadow: 0 8px 24px rgba(196, 181, 253, 0.35);
}

.membership-premium-cta:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.membership-premium-cta:active:not(:disabled) {
    transform: translateY(0);
}

.membership-premium-cta:disabled {
    opacity: 0.65;
    cursor: wait;
}

.membership-premium-details {
    display: block;
    margin-top: 0.85rem;
    text-align: center;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
}

.membership-premium-details:hover {
    color: #fff;
    text-decoration: underline;
}

.membership-premium-age-note,
.membership-premium-blocked {
    margin: 0 0 0.85rem;
    font-size: 0.82rem;
    line-height: 1.45;
    opacity: 0.88;
}

.membership-premium-blocked {
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.membership-premium-subscribed-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin: 0.35rem 0 0.85rem;
}

.membership-premium-subscribed-row {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 600;
    color: #047857;
}

.membership-billing-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.membership-billing-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: inherit;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.membership-billing-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.membership-billing-option.is-selected {
    border-color: rgba(251, 191, 36, 0.85);
    background: rgba(251, 191, 36, 0.14);
    transform: translateY(-1px);
}

.membership-premium-card--angels .membership-billing-option.is-selected {
    border-color: rgba(196, 181, 253, 0.95);
    background: rgba(196, 181, 253, 0.18);
}

.membership-billing-option-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.82;
}

.membership-billing-option-price {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.membership-payment-bar {
    margin: 0 0.75rem 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.membership-payment-picker-label {
    margin: 0 0 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}

.membership-payment-options {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.membership-payment-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.membership-payment-option:hover:not(:disabled) {
    border-color: #94a3b8;
}

.membership-payment-option.is-selected {
    border-color: #0f766e;
    background: #f0fdfa;
}

.membership-payment-option:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.membership-payment-option-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
}

.membership-payment-option-sub {
    font-size: 0.75rem;
    color: #64748b;
}

.membership-payment-picker--inline {
    margin: 0.5rem 0 0;
}

@media (min-width: 640px) {
    .membership-payment-options {
        flex-direction: row;
    }

    .membership-payment-option {
        flex: 1;
    }
}

.membership-child-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    border: 0;
    padding: 0;
    background: rgba(15, 23, 42, 0.45);
    cursor: pointer;
}

.membership-child-modal {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 1201;
    transform: translate(-50%, -50%);
    width: min(92vw, 420px);
    max-height: 85vh;
    overflow: auto;
    padding: 1.25rem;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

.membership-child-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.membership-child-modal-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

.membership-child-modal-close {
    border: 0;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
}

.membership-child-modal-text {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    color: #64748b;
}

.membership-child-modal-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.membership-child-modal-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    text-align: left;
    cursor: pointer;
}

.membership-child-modal-option.is-selected {
    border-color: #0f766e;
    background: #f0fdfa;
}

.membership-child-modal-option-name {
    font-weight: 700;
    color: #0f172a;
}

.membership-child-modal-option-meta {
    font-size: 0.85rem;
    color: #64748b;
}

.membership-child-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.membership-child-modal-cancel {
    border: 0;
    background: transparent;
    color: #64748b;
    font-weight: 600;
    cursor: pointer;
}

.membership-child-modal-confirm {
    width: auto;
    min-width: 10rem;
    margin: 0;
}

.membership-renewal-notice {
    margin: 0 0 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    border: 1px solid #99f6e4;
    background: linear-gradient(135deg, #f0fdfa 0%, #ecfeff 100%);
}

.membership-renewal-notice-text {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.45;
    color: #334155;
}

.membership-renewal-notice-text strong {
    color: #0f172a;
    font-weight: 700;
}

.membership-child-renewal {
    margin: 0 0 0.85rem;
    padding: 0.85rem 0.95rem;
    border-radius: 14px;
    border: 1px solid rgba(196, 181, 253, 0.45);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(196, 181, 253, 0.12) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.membership-child-renewal-lead {
    margin: 0 0 0.45rem;
    font-size: 0.88rem;
    line-height: 1.5;
    color: rgba(248, 250, 252, 0.94);
}

.membership-child-renewal-lead strong {
    color: #f5f3ff;
    font-weight: 700;
}

.membership-child-renewal-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.35rem;
    border-radius: 999px;
    background: rgba(167, 243, 208, 0.22);
    color: #6ee7b7;
    font-size: 0.72rem;
    font-weight: 800;
    vertical-align: middle;
}

.membership-child-renewal-ask {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: rgba(224, 231, 255, 0.88);
}

.membership-child-renewal-ask strong {
    color: #e9d5ff;
    font-weight: 700;
}

.membership-child-renewal-list {
    list-style: none;
    margin: 0 0 0.55rem;
    padding: 0;
}

.membership-child-renewal-list li {
    padding: 0.35rem 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: rgba(248, 250, 252, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.membership-child-renewal-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.membership-child-renewal-name {
    font-weight: 700;
    color: #f5f3ff;
}

.membership-child-renewal-until,
.membership-child-renewal-extends {
    opacity: 0.88;
}

.memberships-purchase-banner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0 0.35rem 0.75rem;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    border: 1px solid #fecaca;
    background: #fef2f2;
}

.memberships-purchase-banner p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #991b1b;
}

.memberships-purchase-banner-dismiss {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: #b91c1c;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

.membership-child-modal-option {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
}

.membership-child-modal-option-main {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
}

.membership-child-modal-option.has-active-membership {
    border-color: rgba(196, 181, 253, 0.55);
    background: rgba(196, 181, 253, 0.08);
}

.membership-child-modal-option-status {
    display: block;
    width: 100%;
    font-size: 0.78rem;
    line-height: 1.4;
    color: #475569;
    text-align: left;
}

.membership-child-modal-option-status--new {
    color: #0369a1;
    font-weight: 600;
}

.membership-child-modal-option-renew {
    display: block;
    margin-top: 0.15rem;
    color: #6d28d9;
    font-weight: 600;
}

.membership-child-modal--renew .membership-child-modal-confirm {
    background: linear-gradient(135deg, #f5f3ff 0%, #ddd6fe 55%, #c4b5fd 100%);
    color: #312e81;
}

.sp-checkout-child-age-note {
    margin: 0 0 0.65rem;
}

.memberships-gate {
    margin: 0 0.75rem 1rem;
    padding: 2rem 1.5rem;
    text-align: center;
    border-radius: 16px;
    background: linear-gradient(145deg, #fff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.memberships-gate p {
    margin: 0 0 1.25rem;
    color: #475569;
}

.memberships-gate-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    color: #fff;
}

.memberships-gate-btn--ghost {
    background: #fff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.memberships-loading {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    padding: 0 0.75rem;
}

.memberships-loading-card {
    min-height: 420px;
    border-radius: 20px;
    background: linear-gradient(110deg, #e2e8f0 8%, #f1f5f9 18%, #e2e8f0 33%);
    background-size: 200% 100%;
    animation: memberships-shimmer 1.4s ease infinite;
}

.memberships-loading-card--wide {
    grid-column: 1 / -1;
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
}

@keyframes memberships-shimmer {
    to {
        background-position-x: -200%;
    }
}

.memberships-detail-page {
    padding-bottom: 2rem;
}

.membership-detail-premium {
    margin: 0 0.75rem;
    border-radius: 22px;
    overflow: hidden;
    box-shadow:
        0 28px 56px rgba(15, 23, 42, 0.16),
        0 6px 16px rgba(15, 23, 42, 0.08);
}

.membership-detail-premium-inner {
    position: relative;
    z-index: 1;
    padding: 1.85rem 1.65rem 1.65rem;
}

.membership-detail-premium-title {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.membership-detail-premium-price-block {
    margin-bottom: 1.15rem;
}

.membership-detail-premium-desc {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    line-height: 1.55;
    opacity: 0.9;
}

.membership-detail-premium-perks {
    margin-bottom: 1rem;
}

.membership-detail-premium-note {
    margin: 0 0 1.25rem;
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    font-size: 0.85rem;
    line-height: 1.45;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    opacity: 0.92;
}

.membership-detail-premium-cta {
    max-width: 100%;
}

/* Legacy badge classes (profile, admin) */
.membership-card-badge {
    align-self: flex-start;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
}

.membership-card-badge--vip {
    background: #fef3c7;
    color: #92400e;
}

.membership-card-badge--angels {
    background: #ede9fe;
    color: #5b21b6;
}

.sp-cart-item-media--membership {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eff6ff, #f5f3ff);
}

.sp-cart-membership-mark {
    font-weight: 700;
    color: #2563eb;
    font-size: 0.85rem;
}

.sp-profile-vip-badge {
    display: none;
}

/* Golden VIP ticket badge */
.sp-vip-ticket {
    position: relative;
    margin-top: 0.75rem;
    filter: drop-shadow(0 3px 8px rgba(180, 110, 20, 0.28));
}

.sp-vip-ticket-body {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.42rem 1.05rem 0.42rem 0.85rem;
    background:
        linear-gradient(135deg, #fff9e6 0%, #fde68a 18%, #fbbf24 52%, #d97706 100%);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 6px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.65),
        inset 0 -1px 0 rgba(120, 60, 0, 0.15);
    position: relative;
}

.sp-vip-ticket-body::before,
.sp-vip-ticket-body::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.sp-vip-ticket-body::before {
    left: -5px;
}

.sp-vip-ticket-body::after {
    right: -5px;
}

.sp-vip-ticket-icon {
    font-size: 1rem;
    line-height: 1;
    color: #78350f;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.sp-vip-ticket-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.05rem;
    line-height: 1.15;
}

.sp-vip-ticket-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #451a03;
}

.sp-vip-ticket-sub {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(69, 26, 3, 0.72);
}

.sp-profile-memberships {
    margin: 0;
    padding: 0.85rem 1rem 1rem;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

.sp-profile-section-label {
    margin: 0 0 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}

.sp-profile-membership-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sp-profile-membership-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.75rem 0.85rem;
    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.sp-profile-membership-item--vip {
    border-color: rgba(217, 119, 6, 0.28);
    background: linear-gradient(135deg, #fffbeb 0%, #fff 100%);
}

.sp-profile-membership-item--angels {
    border-color: rgba(99, 102, 241, 0.28);
    background: linear-gradient(135deg, #f5f3ff 0%, #fff 100%);
}

.sp-profile-membership-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #f1f5f9;
    color: #475569;
}

.sp-profile-membership-item--vip .sp-profile-membership-icon {
    background: linear-gradient(135deg, #fde68a, #fbbf24);
    color: #78350f;
}

.sp-profile-membership-item--angels .sp-profile-membership-icon {
    background: linear-gradient(135deg, #ddd6fe, #a78bfa);
    color: #4c1d95;
}

.sp-profile-membership-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.sp-profile-membership-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
}

.sp-profile-membership-child {
    font-size: 0.8125rem;
    color: #64748b;
}

.sp-profile-membership-expiry {
    font-size: 0.75rem;
    color: #94a3b8;
}

.admin-settings-detail {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.admin-commission-page {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-width: 640px;
}

.admin-commission-back {
    margin-bottom: 0.15rem;
}

.admin-commission-hero {
    padding: 0.15rem 0 0.35rem;
}

.admin-commission-hero h2 {
    margin: 0 0 0.35rem;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.admin-commission-hero-sub {
    margin: 0;
    font-size: 0.92rem;
    color: #64748b;
    line-height: 1.45;
}

.admin-commission-card--compact {
    padding: 0.85rem 1rem;
}

.admin-commission-card--compact .admin-commission-card-title {
    margin: 0 0 0.65rem;
    font-size: 0.98rem;
}

.admin-commission-card--compact .admin-commission-level-grid {
    gap: 0.55rem;
}

.admin-commission-card--compact .admin-commission-level-field label {
    margin-bottom: 0.25rem;
    font-size: 0.76rem;
}

.admin-commission-card--compact .admin-commission-input {
    padding: 0.4rem 0 !important;
    font-size: 0.92rem;
}

.admin-commission-card--compact .admin-commission-membership-grid {
    gap: 0.55rem;
}

.admin-commission-card--compact .admin-commission-plan-card {
    padding: 0.65rem 0.75rem;
}

.admin-commission-card--compact .admin-commission-plan-name {
    margin: 0 0 0.45rem;
    font-size: 0.88rem;
}

.admin-commission-card--compact .admin-commission-plan-label {
    margin-bottom: 0.25rem;
    font-size: 0.72rem;
}

.admin-commission-card--compact .admin-commission-input-wrap--plan {
    max-width: 100%;
    margin-bottom: 0;
}

.admin-commission-card--compact .admin-commission-card-footer {
    margin-top: 0.75rem;
    padding-top: 0.65rem;
    gap: 0.5rem;
}

.admin-commission-card--compact .admin-commission-save-btn {
    min-width: 5.5rem;
    padding: 0.45rem 1rem;
}

.admin-settings-form {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.admin-commission-card--compact .admin-settings-form .form-control {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    padding: 0.5rem 0.75rem;
    font-size: 0.92rem;
    line-height: 1.4;
    box-shadow: none;
}

.admin-commission-card--compact .admin-settings-form .form-control:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
    background: #fff;
    outline: none;
}

.admin-commission-card--compact .admin-settings-form .admin-settings-textarea {
    min-height: 4.5rem;
    resize: vertical;
}

.admin-commission-card--compact .admin-settings-form .admin-commission-card-footer {
    margin-top: 0.35rem;
}

.admin-commission-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.25rem 1.35rem;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
}

.admin-commission-card--loading,
.admin-commission-card--error {
    text-align: center;
    color: #64748b;
}

.admin-commission-card--error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.admin-commission-card-head {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    margin-bottom: 1.15rem;
}

.admin-commission-card-icon {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
}

.admin-commission-card-icon--referral {
    background: #ede9fe;
    color: #6d28d9;
}

.admin-commission-card-icon--membership {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.admin-commission-card-title {
    margin: 0 0 0.3rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.admin-commission-card-desc {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.5;
    color: #64748b;
}

.admin-commission-level-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.admin-commission-level-field label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #334155;
}

.admin-commission-level-hint {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.72rem;
    color: #94a3b8;
}

.admin-commission-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.admin-commission-input-wrap:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
    background: #fff;
}

.admin-commission-input-wrap--plan {
    max-width: 9rem;
    margin-bottom: 0.85rem;
}

.admin-commission-input {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0.55rem 0 !important;
    min-width: 0;
    font-weight: 700;
    font-size: 1rem;
}

.admin-commission-input-suffix {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
}

.admin-commission-payout-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    font-size: 0.82rem;
    color: #166534;
}

.admin-commission-payout-label {
    color: #15803d;
    font-weight: 600;
}

.admin-commission-membership-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.admin-commission-plan-card {
    padding: 1rem 1.05rem;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.admin-commission-plan-card--vip {
    background: linear-gradient(160deg, #fffbeb 0%, #fff 55%);
    border-color: #fde68a;
}

.admin-commission-plan-card--angels {
    background: linear-gradient(160deg, #f5f3ff 0%, #fff 55%);
    border-color: #ddd6fe;
}

.admin-commission-plan-top {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    margin-bottom: 0.85rem;
}

.admin-commission-plan-icon {
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
}

.admin-commission-plan-name {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}

.admin-commission-plan-sub {
    margin: 0.1rem 0 0;
    font-size: 0.75rem;
    color: #64748b;
}

.admin-commission-plan-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-commission-split-bar {
    display: flex;
    height: 0.55rem;
    border-radius: 999px;
    overflow: hidden;
    background: #e2e8f0;
}

.admin-commission-split-admin {
    background: linear-gradient(90deg, #0f766e 0%, #14b8a6 100%);
    min-width: 0;
    transition: width 0.2s ease;
}

.admin-commission-split-company {
    background: linear-gradient(90deg, #6366f1 0%, #818cf8 100%);
    min-width: 0;
    transition: width 0.2s ease;
}

.admin-commission-split-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-top: 0.55rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
}

.admin-commission-dot {
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    margin-right: 0.3rem;
    vertical-align: middle;
}

.admin-commission-dot--admin {
    background: #0f766e;
}

.admin-commission-dot--company {
    background: #6366f1;
}

.admin-commission-split-note {
    margin: 0.45rem 0 0;
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.4;
}

.admin-commission-card-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.15rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.admin-commission-save-btn {
    min-width: 11rem;
}

.admin-commission-save-msg {
    margin: 0 auto 0 0;
    font-size: 0.86rem;
    font-weight: 600;
    color: #15803d;
}

@media (max-width: 768px) {
    .admin-commission-level-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-commission-membership-grid {
        grid-template-columns: 1fr;
    }

    .admin-commission-card-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-commission-save-btn {
        width: 100%;
    }

    .admin-commission-save-msg {
        margin: 0;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .admin-commission-level-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .admin-commission-level-grid {
        grid-template-columns: 1fr;
    }
}

.admin-commission-approvals {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.admin-commission-approvals-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
}

.admin-commission-approvals-subtitle {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.35;
    color: #64748b;
    max-width: 52rem;
}

.admin-commission-approvals-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-commission-approvals-stat {
    min-width: 7rem;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.admin-commission-approvals-stat-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.15;
}

.admin-commission-approvals-stat-label {
    font-size: 0.72rem;
    color: #64748b;
}

.admin-commission-approvals-table-wrap {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}

.admin-commission-approvals-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-commission-approvals-table th,
.admin-commission-approvals-table td {
    padding: 0.55rem 0.75rem;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid #eef2f7;
}

.admin-commission-approvals-table th {
    background: #f8fafc;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.admin-commission-approvals-table tr:last-child td {
    border-bottom: 0;
}

.admin-commission-approvals-product {
    max-width: 14rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.4;
}

.admin-commission-approvals-payment {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    text-align: right;
}

.admin-commission-approvals-col-amount {
    text-align: right;
    white-space: nowrap;
}

.admin-commission-approvals-date,
.admin-commission-approvals-status {
    display: block;
}

.admin-commission-approvals-col-menu {
    width: 2.5rem;
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
    text-align: center;
    vertical-align: middle;
}

.admin-commission-approvals-more {
    position: relative;
    display: inline-flex;
    justify-content: center;
}

.admin-commission-approvals-col-action {
    width: 10.5rem;
    text-align: right;
    white-space: nowrap;
    vertical-align: middle;
}

.admin-commission-approvals-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    border: 1px solid #bfdbfe;
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    color: #1d4ed8;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.12);
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.admin-commission-approvals-view-btn:hover {
    background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #93c5fd;
    color: #1e40af;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.18);
    transform: translateY(-1px);
}

.admin-commission-approvals-view-btn-icon {
    font-size: 0.95rem;
    line-height: 1;
    transition: transform 0.15s ease;
}

.admin-commission-approvals-view-btn:hover .admin-commission-approvals-view-btn-icon {
    transform: translateX(2px);
}

@media (max-width: 640px) {
    .admin-commission-approvals-view-btn span:first-child {
        display: none;
    }

    .admin-commission-approvals-view-btn {
        padding: 0.5rem 0.65rem;
    }

    .admin-commission-approvals-view-btn::before {
        content: "View";
        font-size: 0.82rem;
        font-weight: 600;
    }

    .admin-commission-approvals-col-action {
        width: 4.5rem;
    }
}

.admin-commission-approvals-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: #64748b;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
}

.admin-commission-approvals-col-check {
    width: 2.75rem;
    padding-left: 0.65rem !important;
    padding-right: 0.25rem !important;
    text-align: center;
}

.admin-commission-approvals-checkbox {
    width: 1rem;
    height: 1rem;
    margin: 0;
    cursor: pointer;
    accent-color: #2563eb;
}

.admin-commission-approvals-row.is-selected td {
    background: #eff6ff;
}

.admin-commission-approvals-bulk-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    font-size: 0.9rem;
    color: #1e40af;
}

.admin-commission-approvals-banner {
    margin-bottom: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    font-size: 0.9rem;
}

.admin-commission-detail {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 52rem;
}

.admin-commission-detail-banner {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    font-size: 0.9rem;
}

.admin-commission-detail-order {
    padding: 1rem 1.1rem;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.admin-commission-detail-order-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.admin-commission-detail-order-id {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.admin-commission-detail-order-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
}

.admin-commission-detail-order-badge.is-paid {
    background: #dcfce7;
    color: #166534;
}

.admin-commission-detail-order-customer {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

.admin-commission-detail-order-product {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    color: #334155;
    line-height: 1.45;
}

.admin-commission-detail-order-meta {
    margin: 0.5rem 0 0;
    font-size: 0.82rem;
    color: #64748b;
}

.admin-commission-detail-hero {
    padding: 1.15rem 1.2rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 55%, #fff 100%);
    border: 1px solid #bfdbfe;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
}

.admin-commission-detail-hero-main {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.admin-commission-detail-hero-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #3b82f6;
}

.admin-commission-detail-hero-value {
    font-size: clamp(1.75rem, 5vw, 2.25rem);
    font-weight: 800;
    color: #1e3a8a;
    line-height: 1.1;
}

.admin-commission-detail-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

@media (min-width: 540px) {
    .admin-commission-detail-stat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.admin-commission-detail-stat {
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.admin-commission-detail-stat-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.15rem;
}

.admin-commission-detail-stat-value {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}

.admin-commission-detail-stat.is-pending .admin-commission-detail-stat-value {
    color: #b45309;
}

.admin-commission-detail-stat.is-approved .admin-commission-detail-stat-value {
    color: #047857;
}

.admin-commission-detail-stat.is-rejected .admin-commission-detail-stat-value {
    color: #b91c1c;
}

.admin-commission-detail-approve-all,
.admin-commission-detail-approve-btn {
    width: 100%;
    margin-top: 0;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.admin-commission-detail-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.admin-commission-detail-section-head h3 {
    margin: 0;
}

.admin-commission-detail-inline-error {
    margin-bottom: 0.85rem;
}

@media (max-width: 480px) {
    .admin-commission-detail-section-head .admin-commission-detail-approve-btn {
        width: 100%;
    }
}

.admin-commission-detail-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -0.15rem;
    padding: 0 0.15rem;
}

.admin-commission-detail-table {
    width: 100%;
    min-width: 32rem;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.admin-commission-detail-table th,
.admin-commission-detail-table td {
    padding: 0.7rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.admin-commission-detail-table th {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    background: #f8fafc;
    white-space: nowrap;
}

.admin-commission-detail-table tbody tr.is-pending {
    background: #fffbeb;
}

.admin-commission-detail-table tbody tr.is-approved {
    background: #f0fdf4;
}

.admin-commission-detail-table tbody tr.is-rejected {
    background: #fef2f2;
}

.admin-commission-detail-table-level {
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
}

.admin-commission-detail-table-agent-name {
    display: block;
    font-weight: 600;
    color: #0f172a;
}

.admin-commission-detail-table-agent-id {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.75rem;
    color: #64748b;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.admin-commission-detail-table-reject-note {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.78rem;
    color: #b91c1c;
}

.admin-commission-detail-table-amount {
    font-weight: 700;
    color: #1d4ed8;
    white-space: nowrap;
}

.admin-commission-detail-table-total td {
    border-top: 2px solid #cbd5e1;
    border-bottom: none;
    background: #f1f5f9;
}

.admin-commission-detail-section {
    padding: 1.1rem 1.15rem;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.admin-commission-detail-section h3 {
    margin: 0 0 0.85rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}

.admin-commission-detail-legs {
    display: grid;
    gap: 0.75rem;
}

@media (min-width: 720px) {
    .admin-commission-detail-legs {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .admin-commission-detail-footer-total {
        grid-column: 1 / -1;
    }
}

.admin-commission-leg {
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.admin-commission-leg.is-pending {
    border-color: #fcd34d;
    background: #fffbeb;
}

.admin-commission-leg.is-approved {
    border-color: #86efac;
    background: #f0fdf4;
}

.admin-commission-leg.is-rejected {
    border-color: #fca5a5;
    background: #fef2f2;
}

.admin-commission-leg-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.admin-commission-leg-type {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #475569;
}

.admin-commission-leg-status-pill {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
}

.admin-commission-leg.is-pending .admin-commission-leg-status-pill {
    background: #fef3c7;
    color: #92400e;
}

.admin-commission-leg.is-approved .admin-commission-leg-status-pill {
    background: #dcfce7;
    color: #166534;
}

.admin-commission-leg.is-rejected .admin-commission-leg-status-pill {
    background: #fee2e2;
    color: #991b1b;
}

.admin-commission-leg-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-commission-leg-agent strong {
    display: block;
    font-size: 1rem;
    color: #0f172a;
}

.admin-commission-leg-agent-id {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.78rem;
    color: #64748b;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.admin-commission-leg-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.admin-commission-leg-metric {
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.admin-commission-leg-metric-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 0.1rem;
}

.admin-commission-leg-metric-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}

.admin-commission-leg-metric-value.is-amount {
    color: #1d4ed8;
    font-size: 1.05rem;
}

.admin-commission-leg-reject-reason {
    margin: 0.65rem 0 0;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    font-size: 0.82rem;
    color: #b91c1c;
    background: #fff;
    border: 1px solid #fecaca;
}

.admin-commission-leg-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.admin-commission-leg-actions .btn-primary,
.admin-commission-leg-actions .btn-secondary {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
}

.admin-commission-detail-footer-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    font-size: 0.95rem;
    color: #334155;
}

.admin-commission-detail-footer-total strong {
    font-size: 1.1rem;
    color: #1e3a8a;
}

.admin-commission-detail-summary .is-pending {
    color: #b45309;
}

.admin-commission-detail-summary .is-credit,
.admin-commission-approvals-table .is-credit {
    color: #047857;
}

.admin-commission-detail-summary .is-debit,
.admin-commission-approvals-table .is-debit {
    color: #b91c1c;
}

.admin-commission-reject-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(15, 23, 42, 0.45);
}

.admin-commission-reject-modal {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 1201;
    transform: translate(-50%, -50%);
    width: min(92vw, 420px);
    padding: 1.2rem;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

.admin-commission-reject-modal h4 {
    margin: 0 0 0.35rem;
}

.admin-commission-reject-modal label {
    display: block;
    margin: 0.85rem 0 0.35rem;
    font-weight: 600;
}

.admin-commission-reject-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}

.admin-commission-reject-confirm {
    background: #b91c1c;
    border-color: #b91c1c;
}

.admin-settings-section .meta {
    margin-top: 0;
}

/* Admin — full-width panel with side drawer */
.site-shell:has(.admin-shell) .site-header {
    display: none;
}

.site-shell:has(.admin-shell) .site-content,
.admin-page-shell:has(.admin-shell) {
    max-width: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

.admin-shell {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

.admin-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, var(--ew-primary), var(--ew-primary-light));
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 120;
    box-shadow: 0 2px 8px rgba(57, 73, 171, 0.25);
}

.admin-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
}

.admin-menu-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.admin-menu-icon {
    font-size: 1.35rem;
    line-height: 1;
}

.admin-page-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.admin-drawer {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(280px, 85%);
    z-index: 210;
    background: var(--ew-surface);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    padding: 0;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
}

.admin-drawer.open {
    transform: translateX(0);
}

.admin-drawer-backdrop {
    position: absolute;
    inset: 0;
    z-index: 200;
    border: none;
    background: rgba(0, 0, 0, 0.45);
    cursor: pointer;
}

.admin-drawer-header {
    padding: 1.25rem 1rem;
    background: linear-gradient(135deg, var(--ew-primary), var(--ew-primary-light));
    color: #fff;
}

.admin-drawer-header .meta {
    color: rgba(255, 255, 255, 0.85);
    margin: 0.25rem 0 0;
}

.admin-drawer-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.9rem 1rem;
    border: none;
    border-bottom: 1px solid var(--ew-border);
    background: transparent;
    font-size: 0.95rem;
    color: #212121;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
}

.admin-drawer-item:hover {
    background: rgba(57, 73, 171, 0.06);
}

.admin-drawer-item.active {
    background: rgba(57, 73, 171, 0.12);
    color: var(--ew-primary);
    font-weight: 600;
    border-left: 3px solid var(--ew-primary);
    padding-left: calc(1rem - 3px);
}

.admin-drawer-link {
    margin-top: auto;
    text-decoration: none;
    color: var(--ew-text-muted);
}

.admin-shell .state-card {
    margin: 1rem;
}

.admin-shell .attendance-panel {
    margin: 1rem;
}

.admin-shell .admin-events-panel {
    margin: 0;
}

.admin-events-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-events-toolbar h2 {
    margin: 0 0 0.25rem;
}

.admin-events-toolbar .meta {
    margin: 0;
}

.admin-events-toolbar-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.admin-events-form h3 {
    margin: 0 0 1rem;
    font-size: 1rem;
}

.admin-events-form--compact .form-group {
    margin-bottom: 0.5rem;
}

.admin-events-form--compact .form-control::placeholder {
    color: var(--ew-text-muted);
    opacity: 0.9;
}

.admin-events-form--compact .event-type-select option[value="0"] {
    color: var(--ew-text-muted);
}

.admin-events-form--compact .participant-limit-group {
    margin-bottom: 0.5rem;
}

.admin-events-form--compact .participant-limit-switch {
    margin-bottom: 0.35rem;
}

.admin-events-form--compact .event-location-map {
    margin-top: 0.35rem;
}

.admin-events-form--compact .event-location-status {
    margin: 0.25rem 0 0;
    font-size: 0.78rem;
}

.admin-events-form-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.admin-events-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.event-datetime-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: end;
}

.event-datetime-row .event-datetime-field {
    margin-bottom: 0;
    min-width: 0;
}

.event-datetime-row .form-control {
    width: 100%;
    min-width: 0;
}

.admin-event-image-header {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--ew-border, #e5e7eb);
}

.admin-event-images-section {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--ew-border, #e5e7eb);
}

.admin-event-images-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 650;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.admin-event-images-hint {
    margin: 0 0 0.65rem;
}

.admin-event-gallery {
    margin-bottom: 0.65rem;
}

.admin-event-dropzone {
    margin-top: 0;
}

.admin-event-image-preview {
    width: 100%;
    max-width: 28rem;
    aspect-ratio: 16 / 9;
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--ew-surface-2, #f3f4f6);
    margin-bottom: 0.75rem;
}

.admin-event-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.admin-event-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ew-muted, #6b7280);
    font-size: 0.9rem;
}

.admin-event-image-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.admin-event-image-upload {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    margin: 0;
}

.admin-event-image-upload input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    font-size: 0;
}

.admin-event-image-url {
    margin-top: 0.5rem;
    word-break: break-all;
}

.participant-limit-group {
    margin-bottom: 0.75rem;
}

.participant-limit-switch {
    margin-bottom: 0.5rem;
}

.participant-limit-label {
    display: block;
    font-size: 0.875rem;
    margin-bottom: 0.35rem;
}

.event-type-error {
    color: #b91c1c;
}

.event-type-select-wrap {
    position: relative;
    max-width: 20rem;
}

.event-type-select-wrap::after {
    content: "";
    position: absolute;
    right: 0.85rem;
    top: 50%;
    width: 0.45rem;
    height: 0.45rem;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

.event-type-select {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.55rem 2.25rem 0.55rem 0.85rem;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #fff;
    font-size: 0.95rem;
    color: #1e293b;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.event-type-select:hover {
    border-color: #94a3b8;
}

.event-type-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.admin-events-message {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
}

.admin-events-row-main .meta {
    margin: 0.15rem 0;
}

.admin-events-status {
    display: inline-block;
    margin-top: 0.35rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.admin-events-status.is-today {
    background: #e8eaf6;
    color: #3949ab;
}

.admin-events-status.is-upcoming {
    background: #e8f5e9;
    color: #2e7d32;
}

.admin-events-status.is-past {
    background: #f5f5f5;
    color: #757575;
}

.admin-events-status.is-pending {
    background: #fff3e0;
    color: #e65100;
}

.admin-events-status.is-approved {
    background: #e8f5e9;
    color: #2e7d32;
}

.admin-events-status.is-rejected {
    background: #ffebee;
    color: #c62828;
}

.admin-event-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

.event-location-map {
    position: relative;
    z-index: 0;
    isolation: isolate;
    width: 100%;
    height: 280px;
    border-radius: var(--ew-radius);
    border: 1px solid var(--ew-border);
    overflow: hidden;
    background: #eef0fa;
    margin-top: 0.5rem;
}

.event-location-map .leaflet-container {
    z-index: 1;
}

.event-location-search {
    position: relative;
}

.event-location-search-row {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.event-location-search-input {
    flex: 1;
    min-width: 0;
}

.event-location-search-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.event-location-search-results {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius);
    background: var(--ew-surface-raised);
    box-shadow: var(--ew-shadow-hover);
    max-height: 240px;
    overflow-y: auto;
    z-index: 20;
}

.event-location-search-results li + li {
    border-top: 1px solid var(--ew-border);
}

.event-location-search-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: var(--ew-text);
}

.event-location-search-item:hover,
.event-location-search-item:focus {
    background: var(--ew-sidebar-hover);
    outline: none;
}

.event-location-search-item-title {
    font-weight: 600;
    font-size: 0.92rem;
}

.event-location-search-item-address {
    font-size: 0.82rem;
    color: var(--ew-text-muted);
    line-height: 1.35;
}

.event-location-status {
    margin: 0.5rem 0 0;
}

.event-location-status--error {
    color: var(--ew-danger, #b91c1c);
}

@media (max-width: 640px) {
    .admin-events-toolbar {
        flex-direction: column;
    }

    .admin-events-form-row:not(.event-datetime-row) {
        grid-template-columns: 1fr;
    }

    .event-datetime-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 0.5rem;
    }
}

.admin-tabs {
    display: none;
}

.admin-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius-sm);
    background: #fff;
}

table.admin-table {
    display: table;
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    table-layout: auto;
}

table.admin-table thead {
    display: table-header-group;
}

table.admin-table tbody {
    display: table-row-group;
}

table.admin-table tr {
    display: table-row;
}

table.admin-table th,
table.admin-table td {
    display: table-cell;
    padding: 0.65rem 0.85rem;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--ew-border);
}

table.admin-table th {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    background: #f8fafc;
    white-space: nowrap;
}

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

table.admin-table tbody tr:hover td {
    background: #f8fafc;
}

.admin-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-panel-header h2 {
    margin: 0 0 0.25rem;
}

.admin-panel-refresh {
    flex-shrink: 0;
}

.admin-users-panel {
    background: var(--ew-surface);
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius);
    padding: 1.15rem 1.25rem;
    box-shadow: var(--ew-shadow);
}

.admin-users-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.admin-users-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.75rem 0.5rem;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius-sm);
    background: #f8fafc;
}

.admin-users-stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--ew-primary-dark);
    line-height: 1.1;
}

.admin-users-stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ew-text-muted);
}

/* Admin — withdrawal approvals */
.admin-withdrawals-panel {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.admin-withdrawals-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.admin-withdrawals-subtitle {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.3;
    color: var(--ew-text-muted);
}

.admin-withdrawals-notice {
    padding: 0.4rem 0.65rem;
    border-radius: var(--ew-radius-sm);
    background: #eef2ff;
    border: 1px solid #c5cae9;
    color: #3949ab;
    font-size: 0.72rem;
    line-height: 1.35;
}

.admin-withdrawals-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
}

.admin-withdrawals-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.05rem;
    padding: 0.4rem 0.35rem;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius-sm);
    background: #f8fafc;
    text-align: center;
}

.admin-withdrawals-stat--amount {
    background: linear-gradient(135deg, #f8f9ff, #eef2ff);
    border-color: #c5cae9;
}

.admin-withdrawals-stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ew-primary-dark);
    line-height: 1.1;
}

.admin-withdrawals-stat--amount .admin-withdrawals-stat-value {
    font-size: 0.88rem;
}

.admin-withdrawals-stat-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ew-text-muted);
}

.admin-withdrawals-tabs.tab-bar {
    gap: 0.35rem;
    margin-bottom: 0.25rem;
}

.admin-withdrawals-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.admin-withdrawal-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius-sm);
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-withdrawal-row:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
    color: inherit;
}

.admin-withdrawal-row--pending {
    border-left: 3px solid #fb8c00;
}

.admin-withdrawal-row--completed {
    border-left: 3px solid #c5cae9;
}

.admin-withdrawal-row-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ew-text);
    min-width: 0;
}

.admin-withdrawal-row-main {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.5rem;
    min-width: 0;
}

.admin-withdrawal-row-date {
    font-size: 0.72rem;
    color: var(--ew-muted);
    white-space: nowrap;
}

.admin-withdrawal-row-amount {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--ew-primary-dark);
    white-space: nowrap;
    flex-shrink: 0;
}

.admin-withdrawal-row-amount.is-debit {
    color: #c62828;
}

.admin-withdrawal-status {
    display: inline-block;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
}

.admin-withdrawal-status.is-pending {
    background: #fff3e0;
    color: #e65100;
}

.admin-withdrawal-status.is-approved {
    background: #e8f5e9;
    color: #2e7d32;
}

.admin-withdrawal-status.is-rejected {
    background: #ffebee;
    color: #c62828;
}

.admin-withdrawals-empty {
    padding: 0.65rem;
    text-align: center;
    border: 1px dashed var(--ew-border);
    border-radius: var(--ew-radius-sm);
    background: #f8fafc;
    color: var(--ew-text-muted);
    font-size: 0.875rem;
}

.admin-withdrawals-empty p {
    margin: 0;
}

.admin-withdrawal-detail-card {
    margin-top: 0.25rem;
}

.admin-withdrawal-hero {
    margin-top: 0.25rem;
    padding: 1.1rem 1.15rem;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    border-color: #c7d2fe;
}

.admin-withdrawal-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
}

.admin-withdrawal-hero-id {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ew-text-muted);
}

.admin-withdrawal-hero-amount {
    margin: 0;
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--ew-primary-dark);
    letter-spacing: -0.02em;
}

.admin-withdrawal-hero-meta {
    margin: 0.35rem 0 0;
    font-size: 0.84rem;
    color: var(--ew-text-muted);
}

.admin-withdrawal-section-head {
    margin-bottom: 0.85rem;
}

.admin-withdrawal-section-head h3 {
    margin: 0 0 0.2rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ew-text);
}

.admin-withdrawal-section-head .meta {
    margin: 0;
    font-size: 0.8rem;
}

.admin-withdrawal-bank-card {
    margin-top: 0.75rem;
    border-left: 3px solid #1565c0;
    background: #f8fbff;
}

.admin-withdrawal-bank-grid {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 1rem;
}

.admin-withdrawal-bank-item dt {
    margin: 0 0 0.2rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ew-text-muted);
}

.admin-withdrawal-bank-item dd {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ew-text);
    word-break: break-word;
}

.admin-withdrawal-copy-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.admin-withdrawal-copy-row > span {
    min-width: 0;
    flex: 1;
}

.admin-withdrawal-copy-btn {
    flex-shrink: 0;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #fff;
    color: #1565c0;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.35rem 0.65rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.admin-withdrawal-copy-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

.admin-withdrawal-bank-item--full {
    grid-column: 1 / -1;
}

.admin-withdrawal-account-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    width: 100%;
    padding: 0.65rem 0.7rem;
    border: 1px solid #dbeafe;
    border-radius: var(--ew-radius-sm);
    background: #fff;
}

.admin-withdrawal-account-box.is-copied {
    border-color: #86efac;
    background: #f0fdf4;
}

.admin-withdrawal-account-no-text {
    min-width: 0;
    flex: 1;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--ew-text);
    word-break: break-all;
}

.admin-withdrawal-copy-icon-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: var(--ew-radius-sm);
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.admin-withdrawal-copy-icon-btn:hover {
    background: #eff6ff;
    color: #1565c0;
}

.admin-withdrawal-account-box.is-copied .admin-withdrawal-copy-icon-btn {
    color: #15803d;
}

.admin-withdrawal-copy-icon {
    width: 1.15rem;
    height: 1.15rem;
    display: block;
}

.admin-withdrawal-copy-error {
    margin: 0.35rem 0 0;
    color: #c62828;
}

.admin-withdrawal-bank-missing {
    padding: 0.85rem 0.95rem;
    border-radius: var(--ew-radius-sm);
    border: 1px dashed #f59e0b;
    background: #fffbeb;
}

.admin-withdrawal-bank-missing p {
    margin: 0;
    font-size: 0.9rem;
    color: #92400e;
}

.admin-withdrawal-bank-missing .meta {
    margin-top: 0.35rem;
    color: #b45309;
}

.admin-withdrawal-requester-card {
    margin-top: 0.75rem;
}

.admin-withdrawal-bank-warning {
    margin: 0.45rem 0 0;
    text-align: center;
    font-size: 0.8rem;
}

.admin-withdrawal-status.is-pending {
    background: #fff3e0;
    color: #e65100;
}

.admin-withdrawal-detail-fields {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-withdrawal-detail-field {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    gap: 0.65rem;
    align-items: start;
}

.admin-withdrawal-detail-field dt {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ew-text-muted);
}

.admin-withdrawal-detail-field dd {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--ew-text);
    word-break: break-word;
}

.admin-withdrawal-detail-amount {
    font-weight: 700;
    color: var(--ew-primary-dark);
}

.admin-withdrawal-detail-actions {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 1rem;
}

.admin-withdrawal-detail-actions .btn-primary,
.admin-withdrawal-detail-actions .btn-secondary {
    width: 100%;
    min-height: 2.75rem;
    font-size: 0.95rem;
}

@media (max-width: 640px) {
    .admin-withdrawals-notice {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .admin-withdrawals-stat {
        padding: 0.4rem 0.25rem;
    }

    .admin-withdrawals-stat-value {
        font-size: 0.95rem;
    }

    .admin-withdrawals-stat--amount .admin-withdrawals-stat-value {
        font-size: 0.78rem;
    }

    .admin-withdrawal-bank-grid {
        grid-template-columns: 1fr;
    }

    .admin-withdrawal-detail-field {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }
}

@media (min-width: 641px) {
    .admin-withdrawal-detail-actions {
        flex-direction: row;
    }

    .admin-withdrawal-detail-actions .btn-primary,
    .admin-withdrawal-detail-actions .btn-secondary {
        width: auto;
        flex: 1;
    }
}

.admin-users-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.admin-users-search-wrap {
    display: block;
}

.admin-users-search {
    width: 100%;
    max-width: 28rem;
}

.admin-role-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.admin-role-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin: 0 0 1.25rem;
    border-bottom: 1px solid var(--ew-border);
    background: #fff;
    border-radius: var(--ew-radius-sm) var(--ew-radius-sm) 0 0;
}

.admin-role-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.7rem 1.1rem;
    margin-bottom: -1px;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: #64748b;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.admin-role-tab:hover {
    color: var(--ew-primary-dark);
}

.admin-role-tab--active {
    color: var(--ew-primary);
    border-bottom-color: var(--ew-primary);
    font-weight: 600;
}

.admin-role-chip {
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--ew-border);
    border-radius: 999px;
    background: #fff;
    color: #64748b;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
}

.admin-role-chip:hover {
    border-color: #94a3b8;
    color: var(--ew-primary-dark);
}

.admin-role-chip.active {
    border-color: var(--ew-primary);
    background: rgba(74, 99, 216, 0.08);
    color: var(--ew-primary-dark);
    font-weight: 600;
}

.admin-users-count {
    margin: 0 0 0.75rem;
}

.admin-users-empty {
    padding: 2rem 1rem;
    text-align: center;
    border: 1px dashed var(--ew-border);
    border-radius: var(--ew-radius-sm);
    background: #f8fafc;
}

.admin-users-empty p {
    margin: 0;
}

.admin-users-empty .meta {
    margin-top: 0.35rem;
}

.admin-users-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.admin-user-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius-sm);
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-user-card-row {
    gap: 0.5rem;
    padding-right: 0.65rem;
}

.admin-user-card-row .admin-user-card-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.admin-user-card-row .admin-user-card-link:hover {
    box-shadow: none;
}

.admin-user-card-row:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.admin-user-row-more {
    flex-shrink: 0;
}

.admin-user-name-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
}

.admin-user-card-link {
    color: inherit;
    text-decoration: none;
}

.admin-user-card-link:hover {
    color: inherit;
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.admin-user-card-link:focus-visible {
    outline: 2px solid var(--ew-primary);
    outline-offset: 2px;
}

.admin-user-available {
    margin-left: auto;
    flex-shrink: 0;
    padding-left: 1rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.admin-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    background: #dbeafe;
    color: var(--ew-primary-dark);
    font-size: 0.95rem;
    font-weight: 700;
    flex-shrink: 0;
}

.admin-user-avatar-img {
    object-fit: cover;
    border: 1px solid var(--ew-border);
    background: #f1f5f9;
}

.admin-user-info {
    min-width: 0;
    flex: 1;
}

.admin-user-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.2rem;
}

.admin-user-name {
    display: block;
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--ew-text);
}

.admin-user-you {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
    background: #e0e7ff;
    color: var(--ew-primary-dark);
}

.admin-role-badge {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
}

.admin-role-badge--admin {
    background: #ede9fe;
    color: #5b21b6;
}

.admin-role-badge--co-admin {
    background: #fce7f3;
    color: #9d174d;
}

.admin-role-badge--agent {
    background: #dbeafe;
    color: #1d4ed8;
}

.admin-role-badge--user {
    background: #dbeafe;
    color: #1d4ed8;
}

.admin-role-badge--organiser {
    background: #dcfce7;
    color: #15803d;
}

.admin-role-badge--student {
    background: #ffedd5;
    color: #c2410c;
}

.admin-role-badge--loving-angels {
    background: #fce7f3;
    color: #9d174d;
}

.admin-role-badge--other {
    background: #f1f5f9;
    color: #475569;
}

.admin-status-badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
}

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

.admin-status-badge.blocked {
    background: #fee2e2;
    color: #b91c1c;
}

.admin-status-badge.vip {
    background: #fef3c7;
    color: #92400e;
}

.admin-status-badge.not-vip {
    background: #f1f5f9;
    color: #64748b;
}

.admin-user-email {
    margin: 0;
    font-size: 0.875rem;
    color: var(--ew-text);
    word-break: break-word;
}

.admin-user-phone {
    margin: 0.15rem 0 0;
    font-size: 0.875rem;
    color: var(--ew-text-muted);
}

.admin-user-meta {
    margin: 0.2rem 0 0;
    font-size: 0.75rem;
    color: var(--ew-text-muted);
    word-break: break-all;
}

.admin-user-actions {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex-shrink: 0;
}

.admin-user-delete {
    color: #b91c1c;
    border-color: #fecaca;
}

.admin-user-delete:hover {
    background: #fef2f2;
}

.admin-delete-confirm-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.45);
}

.admin-delete-confirm {
    width: min(100%, 22rem);
    padding: 1.15rem 1.1rem 1rem;
    border-radius: var(--ew-radius);
    border: 1px solid var(--ew-border);
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

.admin-delete-confirm-title {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ew-text);
}

.admin-delete-confirm-text {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--ew-text-muted);
}

.admin-delete-confirm-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ew-text);
}

.admin-delete-confirm-input {
    margin-bottom: 1rem;
}

.admin-delete-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.admin-delete-confirm-danger {
    background: #b91c1c;
    border-color: #991b1b;
}

.admin-delete-confirm-danger:hover:not(:disabled) {
    background: #991b1b;
    border-color: #7f1d1d;
}

.admin-delete-confirm-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.admin-user-protected {
    margin: 0;
    flex-shrink: 0;
    align-self: center;
    font-size: 0.75rem;
}

@media (max-width: 640px) {
    .admin-user-detail-actions {
        flex-direction: row;
        width: 100%;
    }

    .admin-user-detail-actions .btn-sm {
        flex: 1;
    }
}

.admin-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--ew-border);
}

.admin-row-actions {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: flex-end;
}

.attendance-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--ew-border);
}

/* Attendance — event list & check-in detail */
.attendance-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.attendance-list-intro h2 {
    margin: 0 0 0.35rem;
    font-size: 1.2rem;
    color: var(--ew-primary);
}

.attendance-list-intro .meta {
    margin: 0;
}

.attendance-current-event-card {
    display: block;
    padding: 1.15rem 1.25rem;
    border-radius: var(--ew-radius);
    background: linear-gradient(135deg, #f5f7ff 0%, #eef0fa 100%);
    border: 2px solid #7986cb;
    box-shadow: 0 4px 16px rgba(57, 73, 171, 0.14);
    text-decoration: none !important;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.attendance-current-event-card:hover {
    border-color: var(--ew-primary);
    box-shadow: 0 6px 20px rgba(57, 73, 171, 0.2);
    transform: translateY(-1px);
}

.attendance-current-event-header {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.85rem;
    align-items: start;
}

.attendance-live-badge {
    grid-column: 1 / -1;
    display: inline-flex;
    align-self: start;
    width: fit-content;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #3949ab;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.attendance-current-event-image {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    background: #eef0fa;
}

.attendance-current-event-body strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: #212121;
}

.attendance-current-event-body .meta {
    margin: 0.1rem 0;
}

.attendance-other-heading {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: #757575;
}

.attendance-progress {
    margin-top: 1rem;
}

.attendance-progress-detail {
    margin-top: 0.85rem;
}

.attendance-progress-compact {
    margin-top: 0.65rem;
}

.attendance-progress-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #424242;
}

.attendance-progress-count {
    font-variant-numeric: tabular-nums;
    color: var(--ew-primary);
}

.attendance-progress-track {
    height: 16px;
    border-radius: 999px;
    background: #cfd8dc;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.12);
}

.attendance-progress-compact .attendance-progress-track {
    height: 10px;
}

.attendance-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #2e7d32 0%, #43a047 45%, #66bb6a 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: width 0.8s ease-out;
    min-width: 0;
}

.attendance-progress-fill.is-full {
    background: linear-gradient(90deg, #1b5e20 0%, #2e7d32 50%, #43a047 100%);
}

.attendance-events-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.attendance-event-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: var(--ew-radius);
    background: var(--ew-surface);
    border: 1px solid var(--ew-border);
    box-shadow: var(--ew-shadow);
    text-decoration: none !important;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.attendance-event-card:hover {
    border-color: #c5cae9;
    box-shadow: 0 4px 14px rgba(57, 73, 171, 0.12);
    transform: translateY(-1px);
}

.attendance-event-card-image {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 8px;
    object-fit: cover;
    background: #eef0fa;
}

.attendance-event-card-body {
    flex: 1;
    min-width: 0;
}

.attendance-event-card-body strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.2rem;
    color: #212121;
}

.attendance-event-card-body .meta {
    margin: 0.1rem 0;
}

.attendance-event-card .attendance-progress {
    display: none !important;
}

.attendance-event-badge {
    min-width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    padding: 0 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #eef0fa;
    color: var(--ew-primary);
    font-size: 0.85rem;
    font-weight: 700;
}

.attendance-back-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none !important;
    color: var(--ew-primary);
    margin-bottom: 0.25rem;
}

.attendance-back-link:hover {
    color: var(--ew-primary-light);
}

.attendance-event-hero {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--ew-radius);
    background: linear-gradient(135deg, #f8f9fc 0%, #eef0fa 100%);
    border: 1px solid #e0e4f0;
}

.attendance-event-hero-image {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid var(--ew-border);
}

.attendance-event-hero-body {
    flex: 1;
    min-width: 0;
}

.attendance-event-title {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    line-height: 1.3;
    color: #1a237e;
}

.attendance-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.attendance-chip {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #d1d9f0;
    font-size: 0.8rem;
    color: #424242;
}

.attendance-scanner-card {
    padding: 1.15rem;
    border-radius: var(--ew-radius);
    background: var(--ew-surface);
    border: 1px solid var(--ew-border);
    box-shadow: var(--ew-shadow);
}

.attendance-scanner-card .qr-scanner-host,
.attendance-scanner-card .qr-scanner-host--active {
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
}

.attendance-scanner-card-header {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.attendance-scanner-card-header h3 {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    color: #212121;
}

.attendance-scanner-card-header .meta {
    margin: 0;
}

.attendance-scanner-icon {
    font-size: 1.75rem;
    line-height: 1;
    flex-shrink: 0;
}

.attendance-scanner-status {
    text-align: center;
    margin: 0.75rem 0 0;
}

.attendance-scanner-retry {
    display: block;
    margin-top: 0.65rem;
}

.qr-scanner-host {
    max-width: 22rem;
    margin: 0 auto;
    border-radius: var(--ew-radius);
    overflow: hidden;
    background: #0f172a;
}

.qr-scanner-host--active {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #0f172a;
}

.qr-scanner-video-region {
    width: 100%;
    max-width: 20rem;
    aspect-ratio: 4 / 3;
    max-height: 15rem;
    margin: 0 auto;
    border-radius: var(--ew-radius);
    overflow: hidden;
    background: #000;
}

.qr-scanner-video-region > div {
    width: 100% !important;
    max-width: 20rem !important;
    margin: 0 auto !important;
}

.qr-scanner-video-region video {
    width: 100% !important;
    height: 100% !important;
    max-height: 15rem !important;
    display: block;
    object-fit: cover;
    border-radius: var(--ew-radius);
    image-rendering: auto;
}

.qr-scanner-actions {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.qr-scanner-file-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background: #fff;
    color: #1d4ed8;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #bfdbfe;
}

.qr-scanner-file-input {
    display: none;
}

.qr-scanner-host video {
    border-radius: var(--ew-radius);
}

/* Legacy html5-qrcode widget (unused) */
.qr-scanner-host img[alt="Info icon"] {
    display: none;
}

.qr-scanner-host #html5-qrcode-anchor-scan-type-change {
    font-size: 0.85rem;
    color: var(--ew-primary) !important;
    text-decoration: none !important;
}

.qr-scanner-host button {
    font-family: inherit;
    border-radius: 8px !important;
    padding: 0.55rem 1rem !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    cursor: pointer;
}

.qr-scanner-host #html5-qrcode-button-camera-permission,
.qr-scanner-host #html5-qrcode-button-camera-start,
.qr-scanner-host #html5-qrcode-button-camera-stop {
    background: var(--ew-primary) !important;
    color: #fff !important;
    border: none !important;
}

.qr-scanner-host #html5-qrcode-button-file-selection {
    background: #fff !important;
    color: var(--ew-primary) !important;
    border: 1px solid #c5cae9 !important;
}

.check-in-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.65rem;
    padding: 0.85rem 1rem;
    border-radius: var(--ew-radius);
    font-size: 0.95rem;
    line-height: 1.4;
}

.check-in-banner strong {
    font-weight: 700;
}

.check-in-banner.check-in-success {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #1b5e20;
}

.check-in-banner.check-in-duplicate {
    background: #fff3e0;
    border: 1px solid #ffcc80;
    color: #e65100;
}

.check-in-banner.check-in-error {
    background: #ffebee;
    border: 1px solid #ef9a9a;
    color: #b71c1c;
}

.check-in-banner-time {
    font-size: 0.85rem;
    opacity: 0.85;
}

.attendance-checkin-popup-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1400;
}

.attendance-checkin-popup {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1401;
    width: min(92vw, 22rem);
    padding: 1.35rem 1.25rem 1.1rem;
    border-radius: calc(var(--ew-radius) + 4px);
    background: #fff;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
    text-align: center;
    animation: attendance-checkin-popup-in 0.22s ease-out;
}

@keyframes attendance-checkin-popup-in {
    from {
        opacity: 0;
        transform: translate(-50%, -46%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.attendance-checkin-popup-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 0.85rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.45rem;
    font-weight: 700;
}

.attendance-checkin-popup.check-in-success .attendance-checkin-popup-icon {
    background: #e8f5e9;
    color: #2e7d32;
}

.attendance-checkin-popup.check-in-duplicate .attendance-checkin-popup-icon {
    background: #fff3e0;
    color: #ef6c00;
}

.attendance-checkin-popup.check-in-error .attendance-checkin-popup-icon {
    background: #ffebee;
    color: #c62828;
}

.attendance-checkin-popup-title {
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
    color: #111827;
}

.attendance-checkin-popup-name {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: #1d4ed8;
}

.attendance-checkin-popup-message {
    margin: 0;
    font-size: 0.95rem;
    color: #4b5563;
    line-height: 1.45;
}

.attendance-checkin-popup-time {
    margin: 0.55rem 0 0;
    font-size: 0.85rem;
    color: #6b7280;
}

.attendance-checkin-popup-dismiss {
    margin-top: 1rem;
    min-width: 5.5rem;
}

.attendance-list-section {
    padding-top: 0.25rem;
}

.attendance-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.attendance-list-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.attendance-list-title h3 {
    margin: 0;
    font-size: 1rem;
    color: #212121;
}

.attendance-stat-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.75rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    background: var(--ew-primary);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
}

.attendance-checkin-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.attendance-checkin-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    background: #fafafa;
    border: 1px solid var(--ew-border);
}

.attendance-checkin-marker {
    width: 1.75rem;
    height: 1.75rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 0.85rem;
    font-weight: 700;
}

.attendance-checkin-body strong {
    display: block;
    font-size: 0.95rem;
}

.attendance-checkin-body .meta {
    margin: 0.15rem 0 0;
}

.attendance-checked-in-at {
    color: #424242;
}

.attendance-empty {
    padding: 1.25rem;
    text-align: center;
    border-radius: var(--ew-radius);
    background: #fafafa;
    border: 1px dashed var(--ew-border);
    color: var(--ew-text-muted);
    font-size: 0.95rem;
}

.attendance-event-row {
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s ease;
    text-decoration: none !important;
    color: inherit;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    box-sizing: border-box;
}

.attendance-event-row:hover {
    background: rgba(57, 73, 171, 0.04);
}

.attendance-event-row.selected {
    background: rgba(57, 73, 171, 0.1);
    border-left: 3px solid var(--ew-primary);
    padding-left: calc(1rem - 3px);
}

/* Badges */
.badge-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.badge-card {
    text-align: center;
    padding: 0.75rem;
    border-radius: 10px;
    background: #fafafa;
    border: 1px solid var(--ew-border);
}

.badge-card.earned {
    background: #eef0fa;
    border-color: #c5cae9;
}

.badge-card.locked {
    opacity: 0.65;
    filter: grayscale(0.4);
}

.badge-image {
    width: 56px;
    height: 56px;
    object-fit: contain;
    margin-bottom: 0.35rem;
}

.badge-card h3 {
    margin: 0 0 0.25rem;
    font-size: 0.85rem;
}

/* General links (outside nav) */
a:not(.nav-item):not(.btn-primary) {
    color: var(--ew-primary);
}

a:not(.nav-item):not(.btn-primary):hover {
    color: var(--ew-primary-light);
}

/* ==========================================================================
   Shopee-style profile (view + edit)
   ========================================================================== */

.sp-profile-view {
    gap: 0.65rem;
}

.sp-profile-main-card {
    overflow: hidden;
}

.sp-profile-card {
    background: #fff;
    border-radius: 0;
    box-shadow: none;
    border: none;
    overflow: hidden;
}

.sp-profile-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem 1.15rem;
    background: #fff;
    overflow: hidden;
}

.sp-profile-hero-bg {
    position: absolute;
    inset: 0 0 auto;
    height: 5.5rem;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    pointer-events: none;
}

.sp-profile-hero--vip .sp-profile-hero-bg {
    background: linear-gradient(180deg, #fffbeb 0%, #fff 100%);
}

.sp-profile-hero .sp-avatar-ring,
.sp-profile-hero .sp-profile-name,
.sp-profile-hero .sp-vip-ticket {
    position: relative;
    z-index: 1;
}

.sp-avatar-ring--vip::before {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fde68a, #f59e0b, #d97706);
    z-index: -1;
}

.sp-avatar-ring--vip .sp-avatar-img,
.sp-avatar-ring--vip .sp-avatar-fallback {
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(180, 110, 20, 0.2);
}

.sp-profile-name {
    margin: 0.75rem 0 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
    letter-spacing: -0.01em;
}

.sp-profile-actions {
    border-top: 1px solid #f0f0f0;
}

.sp-profile-wallet-card {
    background: linear-gradient(135deg, #eff6ff 0%, #fff 55%);
    border: 1px solid #dbeafe !important;
    box-shadow: 0 1px 4px rgba(29, 78, 216, 0.06);
}

.sp-profile-wallet-card:hover {
    background: linear-gradient(135deg, #dbeafe 0%, #fff 55%);
}

.sp-profile-wallet-label {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.sp-profile-wallet-title {
    font-weight: 600;
    color: #0f172a;
}

.sp-profile-wallet-hint {
    font-size: 0.75rem;
    color: #64748b;
}

.sp-profile-wallet-card .sp-wallet-inline-balance {
    font-weight: 700;
    color: #1d4ed8;
}

.sp-profile-tabs-card {
    padding: 0;
    overflow: hidden;
}

.sp-profile-tabs-card .sp-segment-tabs {
    border-bottom: none;
}

.sp-profile-children-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem 0.35rem;
}

.sp-profile-children-summary {
    margin: 0;
    font-size: 0.8125rem;
    color: #888;
}

.sp-profile-manage-children {
    border-top: 1px solid #f0f0f0;
}

.sp-child-name-block {
    min-width: 0;
}

.sp-child-details {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.75rem;
}

.sp-child-details--incomplete {
    color: #b45309;
}

.sp-profile-children {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 0.5rem;
    margin: 0.45rem 0 0;
    padding: 0 0.75rem;
}

.sp-profile-child-name {
    font-size: 0.8125rem;
    color: #666;
    padding: 0.15rem 0.55rem;
    background: #f5f5f5;
    border-radius: 999px;
}

.sp-profile-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1rem;
    border-top: 1px solid #f0f0f0;
    font-size: 0.9375rem;
    color: #222;
    text-decoration: none;
}

.sp-profile-row-link:hover {
    background: #fafafa;
}

.sp-profile-bank-summary {
    max-width: 11rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
}

/* Bank details edit page */
.sp-bank-details-page .sp-bank-details-card {
    margin: 0 0.65rem;
    border-radius: 4px;
    overflow: hidden;
}

.sp-bank-details-banner {
    margin: 0 0.65rem;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.sp-bank-details-banner p {
    margin: 0;
}

.sp-bank-details-banner--error {
    border-left: 3px solid #dc2626;
}

.sp-bank-details-intro {
    margin: 0;
    padding: 1rem 1rem 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #64748b;
    border-bottom: 1px solid #f0f0f0;
}

.sp-bank-details-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
}

.sp-bank-details-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.sp-bank-details-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
}

.sp-bank-details-hint {
    margin: 0;
    font-size: 0.8125rem;
    color: #888;
}

.sp-bank-details-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 0.65rem 0.75rem;
    font-size: 0.9375rem;
    color: #222;
    background: #fff;
    text-align: left;
}

.sp-bank-details-input:focus {
    outline: none;
    border-color: var(--ew-primary);
    box-shadow: 0 0 0 2px rgba(57, 73, 171, 0.12);
}

.sp-bank-details-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}

.sp-bank-details-meta {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid #f0f0f0;
}

.sp-bank-details-meta li {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.875rem;
}

.sp-bank-details-meta li:last-child {
    border-bottom: none;
}

.sp-bank-details-meta-label {
    flex-shrink: 0;
    color: #888;
}

.sp-bank-details-meta-value {
    text-align: right;
    color: #222;
    word-break: break-word;
}

.sp-bank-details-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    padding: 1rem;
    border-top: 1px solid #f0f0f0;
}

.sp-bank-details-save {
    width: 100%;
}

.sp-bank-details-cancel {
    align-self: center;
    padding: 0.35rem 0.75rem;
}

.sp-chevron {
    color: #bbb;
    font-size: 1.25rem;
    line-height: 1;
}

.sp-profile-fields {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid #f0f0f0;
}

.sp-profile-fields li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.875rem;
}

.sp-profile-fields li:last-child {
    border-bottom: none;
}

.sp-field-label {
    flex-shrink: 0;
    color: #888;
    font-size: 0.875rem;
}

.sp-field-value {
    color: #222;
    text-align: right;
    word-break: break-word;
}

.sp-field-mono {
    font-family: ui-monospace, monospace;
    font-size: 0.8125rem;
}

.sp-referral-row {
    align-items: center;
}

.sp-referral-block {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
}

.sp-referral-block .sp-field-label {
    margin-bottom: 0.1rem;
}

.sp-referral-option {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sp-referral-option + .sp-referral-option {
    margin-top: 0.55rem;
}

.sp-referral-option-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ew-text-muted);
}

.sp-referral-hint {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.35;
}

.sp-referral-copy {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
    width: 100%;
}

.sp-referral-link {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.sp-referral-copy .sp-field-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.referral-locked {
    background: #f1f5f9;
    color: #475569;
    cursor: not-allowed;
}

.referral-confirm {
    margin-bottom: 0.75rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid #bbf7d0;
    border-radius: var(--ew-radius-sm);
    background: #f0fdf4;
}

.referral-confirm-title {
    margin: 0 0 0.25rem;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #166534;
}

.referral-confirm-body {
    margin: 0;
    font-size: 0.9rem;
    color: #14532d;
    line-height: 1.45;
}

.referral-confirm-code {
    font-family: ui-monospace, monospace;
    font-size: 0.8rem;
    color: #15803d;
}

.referral-status {
    margin: 0.15rem 0 0;
}

.sp-copy-btn {
    flex-shrink: 0;
    padding: 0.2rem 0.55rem;
    border: 1px solid var(--ew-primary);
    border-radius: 4px;
    background: #fff;
    color: var(--ew-primary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.4;
}

.sp-copy-btn:hover {
    background: #eff6ff;
}

.sp-referral-summary-card {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.sp-referral-summary-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.sp-referral-summary-row .sp-field-value {
    text-align: right;
}

.sp-referral-summary-count {
    font-size: 1.25rem;
    font-weight: 700;
    color: #222;
}

.sp-referral-list-card {
    margin-top: 0.75rem;
}

.sp-referral-list-title {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #222;
}

.sp-referral-tab-intro {
    margin: 0 0 0.85rem;
}

.sp-referral-network {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sp-referral-section-title {
    margin: 0.75rem 0 0.35rem;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ew-text-muted);
}

.sp-referral-section-title:first-child {
    margin-top: 0;
}

.sp-referral-network-value {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.sp-referral-network-empty {
    margin: 0;
}

.sp-referral-count {
    margin: 0 0 0.5rem;
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    font-size: 1.1rem;
}

.sp-referral-list .sp-list-row-main {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.sp-referral-share {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.sp-referral-actions {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.sp-referral-action {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.15rem 0.75rem;
    width: 100%;
    margin: 0;
    padding: 0.8rem 0.9rem;
    border: 1px solid #e5e5e5;
    border-radius: var(--ew-radius-sm);
    background: #fff;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.sp-referral-action:hover {
    border-color: #ccc;
    background: #fafafa;
}

.sp-referral-action.active {
    border-color: var(--ew-primary);
    background: #f8f9ff;
}

.sp-referral-action-title {
    grid-column: 1;
    grid-row: 1;
    font-size: 0.9rem;
    font-weight: 600;
    color: #222;
}

.sp-referral-action-value {
    grid-column: 1;
    grid-row: 2;
    font-size: 0.8rem;
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sp-referral-action-link {
    direction: rtl;
    text-align: left;
}

.sp-referral-action-status {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ew-primary);
    white-space: nowrap;
}

.sp-referral-qr-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.sp-referral-qr-host {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    padding: 0.5rem;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: var(--ew-radius-sm);
}

.sp-referral-qr-host img {
    display: block;
}

.sp-referral-qr-hint {
    margin: 0;
    text-align: center;
}

/* Sub-pages: profile, wallet, edit profile */
.sp-sub-page,
.sp-edit-page {
    margin: -1rem -1.15rem -1.25rem;
    min-height: calc(100dvh - var(--ew-topbar-height) - 2px);
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding-bottom: 1rem;
}

.sp-page-topbar,
.sp-edit-topbar {
    display: grid;
    grid-template-columns: 2.5rem 1fr 2.5rem;
    align-items: center;
    padding: 0.6rem 0.5rem;
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 20;
    margin-bottom: 0;
}

.sp-page-topbar h1,
.sp-edit-topbar h1 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    color: #222;
}

.sp-page-back,
.sp-edit-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.75rem;
    font-weight: 300;
    line-height: 1;
    color: #222;
    text-decoration: none;
}

.sp-page-back:hover,
.sp-edit-back:hover {
    color: var(--ew-primary);
}

.sp-page-topbar-spacer,
.sp-edit-topbar-spacer {
    width: 2.5rem;
}

.sp-page-topbar--back-only {
    display: flex;
    grid-template-columns: unset;
}

.sp-page-topbar--title-only {
    grid-template-columns: 1fr;
}

.sp-page-topbar--title-only h1 {
    text-align: left;
    padding-left: 0.15rem;
}

.sp-sub-card {
    background: #fff;
    margin: 0;
    overflow: hidden;
}

.sp-sub-card.sp-profile-row {
    border-top: none;
}

.sp-row-trailing {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.sp-wallet-inline-balance {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ew-primary);
}

.sp-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem 0;
    gap: 0.5rem;
}

.sp-section-head--solo {
    padding-bottom: 0.35rem;
}

.sp-section-head--solo .sp-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #888;
}

.sp-section-title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #222;
}

.sp-section-hint {
    margin: 0;
    padding: 0.25rem 1rem 0.75rem;
    font-size: 0.8125rem;
    color: #888;
}

.sp-count-pill {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: #f0f0f0;
    color: #555;
}

.sp-children-section .sp-section-hint {
    border-bottom: 1px solid #f0f0f0;
}

.sp-children-tabs {
    display: flex;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
}

.sp-children-tab {
    flex: 1;
    padding: 0.75rem 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #888;
    text-align: center;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.sp-children-tab:hover {
    color: var(--ew-primary);
}

.sp-children-tab.active {
    color: var(--ew-primary);
    font-weight: 600;
    border-bottom-color: var(--ew-primary);
}

.sp-child-form-page {
    padding: 1rem;
}

.sp-child-form-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    margin-top: 1rem;
}

.sp-child-form-cancel {
    display: block;
    text-align: center;
    text-decoration: none;
}

.sp-children-empty {
    padding: 1.25rem 1rem 1.5rem;
    text-align: center;
}

.sp-children-empty-btn {
    display: inline-block;
    width: auto;
    min-width: 12rem;
    margin-top: 0.75rem;
    text-decoration: none;
    color: #fff !important;
}

.sp-children-hint-card {
    padding: 1rem;
    text-align: center;
}

.sp-children-hint-btn {
    display: inline-block;
    margin-top: 0.5rem;
    text-decoration: none;
}

.sp-profile-children-count {
    font-size: 0.8125rem;
    color: #888;
    margin-right: 0.25rem;
}

.sp-profile-logout-btn {
    display: block;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.95rem 1rem;
    border: none;
    background: #fff;
    color: #ee4d2d;
    font-size: 0.9375rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
}

.sp-profile-logout-btn:hover {
    background: #fff5f3;
}

.app-sidebar-logout {
    display: block;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid #fecaca;
    border-radius: var(--ew-radius-sm);
    background: #fff;
    color: #dc2626;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
}

.app-sidebar-logout:hover {
    background: #fef2f2;
}

.sp-empty-hint {
    margin: 0;
    padding: 1rem;
    font-size: 0.875rem;
    color: #888;
    text-align: center;
}

.sp-sub-loading {
    padding: 2rem 1rem;
    text-align: center;
    color: #888;
}

.sp-sub-message {
    margin: 1rem;
    padding: 1.25rem;
    text-align: center;
}

.sp-banner-msg {
    margin: 0 1rem;
    padding: 0.65rem 0.85rem;
    font-size: 0.875rem;
    background: #fff;
    border-radius: 4px;
    color: #444;
}

.sp-list-rows {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sp-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-top: 1px solid #f5f5f5;
}

.sp-list-row-main {
    flex: 1;
    min-width: 0;
}

.sp-list-row-main strong {
    display: block;
    font-size: 0.9375rem;
    color: #222;
}

.sp-list-row-meta {
    display: block;
    font-size: 0.75rem;
    color: #999;
    margin-top: 0.15rem;
}

.sp-list-row-amount {
    font-size: 0.9375rem;
    font-weight: 600;
    white-space: nowrap;
}

.sp-list-row-amount.credit {
    color: #16a34a;
}

.sp-list-row-amount.debit {
    color: #dc2626;
}

.sp-child-row {
    align-items: flex-start;
    flex-wrap: wrap;
}

.sp-child-name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.sp-child-role-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 999px;
    line-height: 1.25;
    white-space: nowrap;
}

.sp-child-name-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sp-child-initial {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #dbeafe;
    color: #1e40af;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sp-child-row-actions {
    display: flex;
    gap: 0.65rem;
    margin-left: auto;
}

.sp-child-edit-block {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sp-add-child-row {
    display: flex;
    gap: 0.5rem;
    padding: 0.85rem 1rem 1rem;
    border-top: 1px solid #f0f0f0;
}

.sp-add-child-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid #f0f0f0;
}

.sp-add-child-heading {
    margin: 0 0 0.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #222;
}

.sp-child-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem 0.75rem;
}

.sp-child-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.sp-child-form-field--full {
    grid-column: 1 / -1;
}

.sp-child-name-block {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.sp-child-details {
    display: block;
    font-size: 0.75rem;
    line-height: 1.35;
}

.sp-child-details--incomplete {
    color: #b45309;
}

.sp-child-edit-block {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.5rem 0;
}

.sp-child-edit-block .sp-inline-actions {
    padding: 0;
}

@media (max-width: 520px) {
    .sp-child-form-grid {
        grid-template-columns: 1fr;
    }

    .sp-child-form-field--full {
        grid-column: auto;
    }
}

.sp-add-child-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #333;
}

.sp-add-child-input {
    min-height: 2.75rem;
}

.sp-add-child-form .sp-add-child-submit {
    width: 100%;
    margin-top: 0.25rem;
}

.sp-add-child-note {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #888;
}

.sp-add-child-note code {
    font-size: 0.7rem;
}

.sp-add-child-row .sp-field-input-block {
    flex: 1;
    min-width: 0;
}

.sp-add-child-row .sp-add-child-btn {
    flex-shrink: 0;
    min-height: 2.75rem;
    min-width: 4.5rem;
    align-self: stretch;
    white-space: nowrap;
}

.sp-child-form-msg {
    margin: 0 1rem 1rem;
}

.sp-field-input-block {
    width: 100%;
    text-align: left;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 0.5rem 0.65rem;
    background: #fff;
    font-size: 0.9375rem;
}

.sp-field-row-stack {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
}

.sp-field-row-stack .sp-field-label {
    width: auto;
    text-align: left;
}

.sp-inline-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1rem 1rem;
}

.sp-btn-text {
    border: none;
    background: none;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ew-primary);
    cursor: pointer;
}

.sp-btn-text-danger {
    color: #dc2626;
}

.sp-save-btn-sm {
    width: auto;
    padding: 0.45rem 1rem;
    font-size: 0.875rem;
}

/* Wallet page */
.sp-wallet-balance-card {
    margin: 0 0.65rem;
    padding: 1.25rem 1rem;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    border-radius: 8px;
    color: #fff;
    text-align: center;
}

.sp-wallet-balance-label {
    margin: 0;
    font-size: 0.8125rem;
    opacity: 0.9;
}

/* Bank-style centered amount (balance + top-up / withdraw) */
.sp-bank-amount {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 0.2rem;
    padding: 0.85rem 1rem 1rem;
    position: relative;
    min-height: 3.75rem;
    cursor: text;
}

.sp-bank-amount--readonly {
    cursor: default;
    padding: 0.35rem 1rem 0;
}

.sp-bank-currency {
    font-size: 1.125rem;
    font-weight: 600;
    color: #888;
    line-height: 1;
    flex-shrink: 0;
}

.sp-bank-value {
    display: inline-flex;
    align-items: baseline;
    line-height: 1;
}

.sp-bank-int {
    font-size: 2.25rem;
    font-weight: 700;
    color: #222;
    letter-spacing: -0.02em;
}

.sp-bank-int.is-placeholder {
    color: #ccc;
}

.sp-bank-dec {
    font-size: 1.125rem;
    font-weight: 600;
    color: #555;
    letter-spacing: 0.02em;
}

.sp-bank-amount--light .sp-bank-currency {
    color: rgba(255, 255, 255, 0.75);
}

.sp-bank-amount--light .sp-bank-int {
    color: #fff;
}

.sp-bank-amount--light .sp-bank-dec {
    color: rgba(255, 255, 255, 0.85);
}

.sp-bank-input-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    opacity: 0;
    font-size: 16px;
    cursor: text;
}

.sp-section-hint-center {
    text-align: center;
    padding-top: 0;
}

.sp-wallet-frozen {
    margin: 0.5rem 0 0;
    font-size: 0.8125rem;
    color: #fecaca;
}

.sp-wallet-quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    padding: 0 0.65rem;
}

.sp-wallet-action-btn {
    padding: 0.65rem 0.75rem;
    border: none;
    border-radius: 4px;
    background: #fff;
    color: var(--ew-primary);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.sp-wallet-action-btn:hover:not(:disabled) {
    background: #f8fafc;
}

.sp-wallet-action-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.sp-wallet-action-btn-outline {
    background: #fff;
    color: #222;
    border: 1px solid #e5e5e5;
}

.sp-wallet-form-card {
    margin: 0 0.65rem;
    border-radius: 4px;
    overflow: hidden;
}

.sp-wallet-form-card .sp-section-title {
    padding: 1rem 1rem 0;
    text-align: center;
}

.sp-wallet-notice {
    margin: 0.75rem 1rem 0;
    padding: 0.75rem 0.85rem;
    border-radius: var(--ew-radius-sm);
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a5f;
    font-size: 0.8125rem;
    line-height: 1.45;
}

.sp-wallet-amount-error {
    margin: 0.35rem 1rem 0;
    color: #dc2626;
    font-size: 0.8125rem;
    font-weight: 600;
    text-align: center;
}

.sp-wallet-segment-tabs .sp-segment-tab {
    font-size: 0.78rem;
    padding: 0.7rem 0.35rem;
}

.sp-wallet-pending-intro {
    margin: 0;
    padding: 0.65rem 1rem 0;
    text-align: center;
}

.sp-wallet-pending-badge {
    display: inline-block;
    margin-top: 0.25rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.sp-list-row-amount.pending {
    color: #b45309;
    font-weight: 600;
}

.sp-wallet-form-card .sp-bank-amount {
    border-bottom: 1px solid #f0f0f0;
}

.sp-wallet-list-card {
    margin: 0 0.65rem;
    border-radius: 4px;
    overflow: hidden;
}

.sp-wallet-txn-sentinel {
    min-height: 2.5rem;
    padding: 0.5rem 0 0.75rem;
}

.sp-sub-loading--inline {
    padding: 0.5rem 1rem 0.75rem;
    text-align: center;
    font-size: 0.8125rem;
}

.sp-wallet-checkout-link {
    margin: 0 0.65rem;
    border-radius: 4px;
}

.sp-segment-tabs {
    display: flex;
    border-bottom: 1px solid #f0f0f0;
}

.sp-segment-tab {
    flex: 1;
    padding: 0.75rem 0.5rem;
    border: none;
    background: #fff;
    font-size: 0.875rem;
    font-weight: 500;
    color: #888;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}

.sp-segment-tab.active {
    color: var(--ew-primary);
    font-weight: 600;
    border-bottom-color: var(--ew-primary);
}

.sp-edit-form {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sp-edit-avatar-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.75rem 1rem 1.25rem;
    background: #fff;
    margin-bottom: 0.65rem;
}

.sp-avatar-ring {
    position: relative;
    width: 96px;
    height: 96px;
}

.sp-avatar-ring-sm {
    width: 80px;
    height: 80px;
}

.sp-avatar-ring-sm .sp-avatar-img,
.sp-avatar-ring-sm .sp-avatar-fallback {
    width: 80px;
    height: 80px;
    font-size: 1.5rem;
}

.sp-avatar-img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 1px solid #f0f0f0;
}

.sp-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #64748b 0%, #94a3b8 100%);
    color: #fff;
    font-size: 1.75rem;
    font-weight: 600;
}

.sp-avatar-camera {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #fff;
    color: #555;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.sp-avatar-camera:hover {
    color: var(--ew-primary);
}

.sp-photo-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 50%;
    transform: translateX(-50%);
    min-width: 11rem;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    z-index: 30;
}

.sp-photo-menu-item {
    display: block;
    position: relative;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #222;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
}

.sp-photo-menu-item:last-child {
    border-bottom: none;
}

.sp-photo-menu-item:hover {
    background: #fafafa;
}

.sp-photo-menu-item input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.sp-photo-menu-item span {
    display: block;
    pointer-events: none;
}

.sp-edit-hint {
    margin: 0.65rem 0 0;
    font-size: 0.8125rem;
    color: #888;
}

.sp-field-list {
    background: #fff;
    margin-bottom: auto;
}

.sp-field-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    min-height: 3rem;
}

.sp-field-row-last {
    border-bottom: none;
}

.sp-field-row .sp-field-label {
    width: 5.25rem;
}

.sp-field-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    text-align: right;
    font-size: 0.9375rem;
    color: #222;
    padding: 0;
    outline: none;
    box-shadow: none;
}

.sp-field-input:focus {
    outline: none;
}

.sp-field-select {
    appearance: none;
    cursor: pointer;
    direction: rtl;
    padding-right: 0.25rem;
}

.sp-field-select option {
    direction: ltr;
}

.sp-field-readonly {
    flex: 1;
    text-align: right;
    font-size: 0.9375rem;
    color: #bbb;
}

.sp-field-readonly--muted {
    color: #ccc;
}

.sp-edit-form-error {
    padding: 0 1rem;
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
}

/* Edit profile — row list + bottom sheet */
.sp-edit-fields-card {
    padding: 0;
    overflow: hidden;
}

.sp-edit-field-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.9rem 1rem;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.sp-edit-field-row:hover {
    background: #fafafa;
}

.sp-edit-field-row--static {
    cursor: default;
}

.sp-edit-field-row--static:hover {
    background: #fff;
}

.sp-edit-field-row--last {
    border-bottom: none;
}

.sp-edit-field-label {
    flex-shrink: 0;
    width: 5.5rem;
    color: #888;
    font-size: 0.875rem;
}

.sp-edit-field-value {
    flex: 1;
    min-width: 0;
    text-align: right;
    font-size: 0.9375rem;
    color: #222;
    word-break: break-word;
}

.sp-edit-field-value--muted {
    color: #bbb;
}

.sp-edit-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 200;
    border: none;
    padding: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.45);
    cursor: pointer;
}

.sp-edit-sheet {
    position: fixed;
    left: 50%;
    top: 58%;
    bottom: auto;
    right: auto;
    z-index: 201;
    width: min(calc(100vw - 2rem), 420px);
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    padding: 0 0 1rem;
    animation: sp-edit-sheet-in 0.22s ease;
}

@keyframes sp-edit-sheet-in {
    from {
        opacity: 0;
        transform: translate(-50%, -46%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.sp-edit-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.sp-edit-sheet-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #222;
}

.sp-edit-sheet-close {
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    color: #888;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.sp-edit-sheet-body {
    padding: 1rem;
}

.sp-edit-sheet-input {
    width: 100%;
    padding: 0.75rem 0.85rem;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    font-size: 1rem;
    color: #222;
    background: #fff;
}

.sp-edit-sheet-input:focus {
    outline: none;
    border-color: var(--ew-primary);
    box-shadow: 0 0 0 2px rgba(238, 77, 45, 0.15);
}

.sp-edit-sheet-select {
    appearance: none;
    cursor: pointer;
}

.sp-edit-sheet-textarea {
    min-height: 8rem;
    resize: vertical;
    line-height: 1.45;
}

.sp-edit-sheet-count {
    margin: 0.5rem 0 0;
    font-size: 0.75rem;
    color: #888;
    text-align: right;
}

.sp-edit-sheet-error {
    margin: 0.65rem 0 0;
    font-size: 0.875rem;
}

.sp-edit-sheet-actions {
    display: flex;
    gap: 0.65rem;
    padding: 0 1rem;
}

.sp-edit-sheet-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
}

.sp-edit-sheet-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.sp-edit-sheet-btn--ghost {
    background: #f5f5f5;
    color: #444;
    border-color: #eee;
}

.sp-edit-sheet-btn--primary {
    background: var(--ew-primary);
    color: #fff;
}

.sp-save-bar {
    padding: 1.25rem 1rem 1.5rem;
    background: #f5f5f5;
}

.sp-save-btn {
    display: block;
    width: 100%;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 4px;
    background: var(--ew-primary);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease;
}

.sp-save-btn:hover:not(:disabled) {
    background: var(--ew-primary-light);
    color: #fff;
}

.sp-save-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.sp-save-btn-secondary {
    background: #fff;
    color: #222;
    border: 1px solid #ddd;
}

.sp-edit-loading,
.sp-edit-message {
    padding: 2rem 1rem;
    text-align: center;
    color: #888;
}

.sp-edit-card {
    background: #fff;
    margin: 1rem;
    padding: 1.5rem;
    border-radius: 4px;
}

/* Discover + Shopee-style cart */
.discover-page {
    padding-bottom: 0.5rem;
}

.discover-quick-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: -0.15rem 0 0.85rem;
    background: #fff;
    border: 1px solid var(--ew-border);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.07);
    overflow: hidden;
}

.discover-quick-bar-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.12rem;
    min-width: 0;
    min-height: 3.35rem;
    padding: 0.62rem 0.55rem;
    border: none;
    border-right: 1px solid var(--ew-border);
    background: transparent;
    text-decoration: none !important;
    color: inherit;
    cursor: pointer;
    text-align: left;
    font: inherit;
}

.discover-quick-bar-item:last-child {
    border-right: none;
}

.discover-quick-bar-item:hover:not(.discover-quick-bar-item--disabled):not(:disabled) {
    background: #fafafa;
}

.discover-quick-bar-item--disabled,
.discover-quick-bar-item:disabled {
    opacity: 0.55;
    cursor: default;
}

.discover-quick-bar-head {
    display: flex;
    align-items: center;
    gap: 0.28rem;
    min-width: 0;
}

.discover-quick-bar-mark {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 4px;
    background: rgba(238, 77, 45, 0.12);
    color: #ee4d2d;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.discover-quick-bar-title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--ew-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.discover-quick-bar-sub {
    font-size: 0.6875rem;
    line-height: 1.25;
    color: var(--ew-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 480px) {
    .discover-quick-bar-item {
        padding: 0.55rem 0.4rem;
        min-height: 3.1rem;
    }

    .discover-quick-bar-title {
        font-size: 0.78rem;
    }

    .discover-quick-bar-sub {
        font-size: 0.64rem;
    }
}

.discover-featured {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.discover-event-grid {
    margin-top: 0.15rem;
}

.discover-carousel {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #111;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.discover-carousel-viewport {
    overflow: hidden;
    width: 100%;
}

.discover-carousel-track {
    display: flex;
    width: 100%;
    transition: transform 0.45s ease;
}

.discover-carousel-track--instant {
    transition: none;
}

.discover-carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
}

.discover-carousel-link {
    display: block;
    position: relative;
    color: #fff;
    text-decoration: none;
}

.discover-carousel-link:hover {
    color: #fff;
}

.discover-carousel-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    min-height: 180px;
    max-height: 280px;
}

.discover-carousel-image--placeholder {
    background: linear-gradient(135deg, #ee4d2d 0%, #ff7337 100%);
}

.discover-carousel-image--tone-1 {
    background: linear-gradient(135deg, #ee4d2d 0%, #ff7337 100%);
}

.discover-carousel-image--tone-2 {
    background: linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);
}

.discover-carousel-image--tone-3 {
    background: linear-gradient(135deg, #059669 0%, #34d399 100%);
}

.discover-carousel-image--tone-4 {
    background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
}

.discover-carousel-image--tone-5 {
    background: linear-gradient(135deg, #d97706 0%, #fbbf24 100%);
}

.discover-carousel-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2.5rem 1rem 1.65rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.35) 55%, transparent 100%);
}

.discover-carousel-type {
    display: inline-block;
    margin-bottom: 0.35rem;
    padding: 0.15rem 0.45rem;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(238, 77, 45, 0.9);
    border-radius: 3px;
}

.discover-carousel-title {
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
}

.discover-carousel-date,
.discover-carousel-venue {
    margin: 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.35;
}

.discover-carousel-price {
    margin: 0.45rem 0 0;
    font-size: 1rem;
    font-weight: 700;
    color: #ffd0c4;
}

.discover-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #333;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.discover-carousel-nav:hover {
    background: #fff;
}

.discover-carousel-nav--prev {
    left: 0.5rem;
}

.discover-carousel-nav--next {
    right: 0.5rem;
}

.discover-carousel-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.55rem;
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    z-index: 2;
    pointer-events: none;
}

.discover-carousel-dot {
    pointer-events: auto;
    width: 0.45rem;
    height: 0.45rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

.discover-carousel-dot.active {
    background: #fff;
    transform: scale(1.15);
}

.discover-page--with-cart {
    padding-bottom: 4.75rem;
}

.event-list--shopee {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.65rem;
    align-items: stretch;
}

.event-card.event-card--shopee {
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    overflow: visible;
    height: 100%;
}

.event-card--shopee:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.event-card--shopee .event-image,
.event-card--shopee .event-image--placeholder {
    height: 110px;
}

.event-card--shopee .event-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0.55rem 0.65rem;
    min-height: 0;
}

.event-card--shopee .event-meta-row:not(.event-date-row),
.event-card--shopee .event-participants {
    display: none;
}

.event-card--shopee .event-date-row {
    font-size: 0.6875rem;
    margin-top: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-card--shopee .event-card-title-link h2 {
    min-height: 0;
    font-size: 0.8125rem;
    margin: 0;
}

.event-card-media-link {
    display: block;
    text-decoration: none;
}

.event-card-title-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.event-card-title-link h2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.5em;
    line-height: 1.25;
}

.event-card-title-link:hover h2 {
    color: var(--ew-primary);
}

.event-image--placeholder {
    background: linear-gradient(135deg, #dbeafe 0%, #e2e8f0 100%);
}

.event-qty-limit,
.event-detail-qty-limit {
    margin: 0.15rem 0 0;
    font-size: 0.75rem;
    color: #64748b;
}

.sp-cart-item-qty-hint {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
}

.sp-checkout-qty-hint {
    font-size: 0.75rem;
    white-space: nowrap;
}

.sp-checkout-item-qty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.45rem;
}

.event-card-price {
    color: #ee4d2d;
    font-size: 1.05rem;
    margin: 0.25rem 0 0;
}

.event-participants {
    font-size: 0.75rem;
    margin-top: 0.1rem;
}

.event-card-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.55rem;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.event-card--shopee .event-card-actions {
    margin-top: auto;
    padding-top: 0.35rem;
}

.event-card--shopee .event-card-price {
    margin-top: 0.15rem;
}

.event-view-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--ew-border);
    border-radius: 4px;
    background: #fff;
    color: #444;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
}

.event-view-btn:hover {
    border-color: var(--ew-primary);
    color: var(--ew-primary);
}

.event-cart-btn {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ee4d2d;
    border-radius: 4px;
    background: #fff5f2;
    color: #ee4d2d;
    cursor: pointer;
    padding: 0;
}

.event-cart-btn svg {
    width: 1rem;
    height: 1rem;
}

.event-cart-btn:hover {
    background: #ee4d2d;
    color: #fff;
}

.event-added-msg {
    margin: 0.35rem 0 0;
    font-size: 0.75rem;
    color: #16a34a;
}

/* Shopee floating cart bar */
.sp-cart-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.85rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid #f0f0f0;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}

.sp-cart-bar-icon-wrap {
    position: relative;
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--ew-sidebar-active);
    color: var(--ew-primary);
    text-decoration: none;
}

.sp-cart-bar-icon {
    width: 1.35rem;
    height: 1.35rem;
}

.sp-cart-badge {
    position: absolute;
    top: -0.15rem;
    right: -0.15rem;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: #ee4d2d;
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1.1rem;
    text-align: center;
}

.sp-cart-bar-summary {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
}

.sp-cart-bar-label {
    font-size: 0.6875rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sp-cart-bar-amount {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ew-text);
}

.sp-cart-bar-checkout {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 7rem;
    min-height: 2.5rem;
    padding: 0 1.15rem;
    border-radius: 4px;
    background: #ee4d2d;
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
}

.sp-cart-bar-checkout:hover {
    background: var(--ew-primary-dark);
    color: #fff;
}

.sp-cart-toast {
    position: fixed;
    left: 50%;
    bottom: 5rem;
    transform: translateX(-50%);
    z-index: 130;
    margin: 0;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    background: rgba(34, 34, 34, 0.88);
    color: #fff;
    font-size: 0.8125rem;
    pointer-events: none;
}

/* Shopping cart page (Shopee-style) */
.sp-cart-page {
    padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
    background: #f5f5f5;
}

.sp-cart-topbar h1 {
    flex: 1;
    text-align: center;
    font-size: 1rem;
}

.sp-cart-edit-btn {
    border: none;
    background: none;
    padding: 0.35rem 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #ee4d2d;
    cursor: pointer;
    white-space: nowrap;
}

.sp-cart-check {
    width: 1.15rem;
    height: 1.15rem;
    margin: 0;
    accent-color: #ee4d2d;
    cursor: pointer;
    flex-shrink: 0;
}

.sp-cart-check-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #333;
    cursor: pointer;
    user-select: none;
}

.sp-cart-select-all {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
}

.sp-cart-select-hint {
    font-size: 0.75rem;
    color: #999;
}

.sp-cart-empty-state {
    margin: 2rem 1rem;
    padding: 2rem 1rem;
    text-align: center;
    background: #fff;
    border-radius: 8px;
}

.sp-cart-empty-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    opacity: 0.35;
}

.sp-cart-empty-title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #333;
}

.sp-cart-empty-btn {
    display: inline-block;
    width: auto;
    min-width: 10rem;
    margin-top: 1rem;
    text-decoration: none;
    color: #fff !important;
}

.sp-cart-list {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
}

.sp-cart-item {
    display: grid;
    grid-template-columns: auto 4.25rem 1fr auto;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    margin-bottom: 0.5rem;
    background: #fff;
    align-items: start;
}

.sp-cart-item--off {
    opacity: 0.55;
}

.sp-cart-item-check {
    display: flex;
    align-items: flex-start;
    padding-top: 1.35rem;
    margin: 0;
    cursor: pointer;
}

.sp-cart-item-media {
    display: block;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 4px;
    overflow: hidden;
    background: #f5f5f5;
    flex-shrink: 0;
}

.sp-cart-item-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sp-cart-item-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
}

.sp-cart-item-body {
    min-width: 0;
}

.sp-cart-item-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.875rem;
    font-weight: 500;
    color: #222;
    text-decoration: none;
    line-height: 1.35;
}

.sp-cart-item-unit {
    margin: 0.2rem 0 0.45rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #ee4d2d;
}

.sp-cart-item-qty-label {
    margin: 0.15rem 0 0;
    font-size: 0.8125rem;
    color: #888;
}

.sp-cart-item-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    padding-top: 0.15rem;
}

.sp-cart-item-delete {
    border: none;
    background: none;
    padding: 0;
    font-size: 0.8125rem;
    color: #ee4d2d;
    cursor: pointer;
}

.sp-cart-item-price {
    margin: 0.25rem 0 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #ee4d2d;
}

.sp-cart-item-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.sp-qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ee4d2d;
    border-radius: 4px;
    overflow: hidden;
}

.sp-qty-btn {
    width: 1.75rem;
    height: 1.75rem;
    border: none;
    background: #fff;
    color: #ee4d2d;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.sp-qty-btn:hover {
    background: #fff5f2;
}

.sp-qty-value {
    min-width: 2rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: #222;
}

.sp-cart-item-remove {
    border: none;
    background: none;
    padding: 0.25rem 0;
    font-size: 0.8125rem;
    color: #888;
    cursor: pointer;
}

.sp-cart-item-remove:hover {
    color: #ee4d2d;
}

.sp-cart-item-total {
    font-size: 0.875rem;
    font-weight: 600;
    color: #222;
    white-space: nowrap;
    padding-top: 0.15rem;
}

.sp-cart-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.85rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid #f0f0f0;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}

.sp-cart-footer-check {
    flex-shrink: 0;
}

.sp-cart-footer-delete {
    flex: 1;
    min-height: 2.65rem;
    border: none;
    border-radius: 4px;
    background: #ee4d2d;
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
}

.sp-cart-footer-delete:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.sp-cart-footer-checkout--disabled {
    opacity: 0.45;
    pointer-events: none;
}

.sp-cart-confirm-backdrop {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.45);
}

.sp-cart-confirm {
    width: min(100%, 20rem);
    padding: 1.25rem 1rem 1rem;
    border-radius: 8px;
    background: #fff;
    text-align: center;
}

.sp-cart-confirm-title {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.sp-cart-confirm-text {
    margin: 0 0 1.25rem;
    font-size: 0.875rem;
    color: #666;
    line-height: 1.45;
}

.sp-cart-confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.sp-cart-confirm-cancel,
.sp-cart-confirm-delete {
    min-height: 2.5rem;
    border-radius: 4px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
}

.sp-cart-confirm-cancel {
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
}

.sp-cart-confirm-delete {
    border: none;
    background: #ee4d2d;
    color: #fff;
}

.sp-cart-footer-summary {
    flex: 1;
    min-width: 0;
}

.sp-cart-footer-label {
    display: block;
    font-size: 0.6875rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sp-cart-footer-amount {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ee4d2d;
}

.sp-cart-footer-checkout {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 8rem;
    min-height: 2.65rem;
    padding: 0 1.25rem;
    border-radius: 4px;
    background: #ee4d2d;
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
}

.sp-cart-footer-checkout:hover {
    background: #f05d40;
    color: #fff;
}

/* Checkout page (Shopee-style) */
.sp-checkout-page {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
    background: #f5f6f8;
}

.sp-checkout-callout {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 0.5rem 0.75rem 0;
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
    background: #fff8f5;
    border: 1px solid #ffe4d9;
}

.sp-checkout-callout-icon {
    flex-shrink: 0;
    width: 1.35rem;
    height: 1.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #ee4d2d;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    font-style: italic;
    line-height: 1;
}

.sp-checkout-callout p {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #5c4a42;
}

.sp-checkout-section {
    margin: 0.55rem 0.75rem 0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.sp-checkout-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.85rem 1rem 0.35rem;
}

.sp-checkout-section-title {
    margin: 0;
    padding: 0.85rem 1rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sp-checkout-section-title--solo {
    padding-bottom: 0.25rem;
}

.sp-checkout-section-head .sp-checkout-section-title {
    padding: 0;
}

.sp-checkout-section-badge {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
}

.sp-section-title-inline {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.sp-checkout-item {
    padding: 0 1rem 1rem;
    border-top: 1px solid #f1f5f9;
}

.sp-checkout-item:first-of-type {
    border-top: none;
}

.sp-checkout-item-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding-top: 0.85rem;
}

.sp-checkout-item-thumb {
    width: 4rem;
    height: 4rem;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #f1f5f9;
}

.sp-checkout-item-thumb--empty {
    background: linear-gradient(145deg, #f8fafc, #e2e8f0);
}

.sp-checkout-item-main {
    flex: 1;
    min-width: 0;
}

.sp-checkout-item-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
}

.sp-checkout-item-title {
    display: block;
    font-size: 0.95rem;
    line-height: 1.35;
    color: #1e293b;
}

.sp-checkout-item-unit {
    margin: 0.2rem 0 0;
    font-size: 0.78rem;
    color: #94a3b8;
}

.sp-checkout-item-line-total {
    font-weight: 700;
    font-size: 0.95rem;
    color: #ee4d2d;
    white-space: nowrap;
}

.sp-checkout-child-card {
    margin-top: 0.75rem;
    padding: 0.7rem 0.75rem;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.sp-checkout-child-card-title {
    margin: 0 0 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.sp-checkout-child-row {
    display: grid;
    grid-template-columns: 4.75rem minmax(0, 1fr);
    gap: 0.5rem;
    align-items: center;
}

.sp-checkout-child-row + .sp-checkout-child-row {
    margin-top: 0.5rem;
}

.sp-checkout-child-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
}

.sp-checkout-field {
    padding: 0 1rem 0.85rem;
}

.sp-checkout-field + .sp-checkout-field {
    padding-top: 0;
}

.sp-checkout-field-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
}

.sp-checkout-select-wrap {
    position: relative;
}

.sp-checkout-select-wrap .sp-field-input {
    appearance: none;
    padding-right: 2rem;
    background: #f8fafc;
    border-color: #e2e8f0;
    border-radius: 8px;
    min-height: 2.65rem;
}

.sp-checkout-select-chevron {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 1.1rem;
    line-height: 1;
    color: #94a3b8;
}

.sp-checkout-child-select,
.sp-checkout-voucher-select {
    width: 100%;
}

.sp-checkout-voucher-loading {
    padding: 1rem;
}

.sp-checkout-totals-card {
    padding: 0.85rem 1rem 1rem;
    background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
}

.sp-checkout-total-row {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
    font-size: 0.9rem;
    color: #475569;
}

.sp-checkout-total-row--discount {
    color: #16a34a;
    font-weight: 600;
}

.sp-checkout-total-row--grand {
    margin-top: 0.35rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #e2e8f0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.sp-checkout-total-row--grand span:last-child {
    color: #ee4d2d;
}

.sp-checkout-error {
    margin: 0.75rem 1rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.sp-checkout-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 120;
    padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.08);
}

.sp-checkout-footer-end {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    max-width: 42rem;
    margin: 0 auto;
}

.sp-checkout-footer-summary {
    flex: 1;
    min-width: 0;
}

.sp-checkout-footer-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
}

.sp-checkout-footer-amount {
    font-size: 1.2rem;
    font-weight: 800;
    color: #ee4d2d;
    letter-spacing: -0.02em;
}

.sp-checkout-footer-pay {
    flex-shrink: 0;
    min-width: 8.5rem;
    min-height: 2.75rem;
    padding: 0 1.35rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(180deg, #f05d40 0%, #ee4d2d 100%);
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(238, 77, 45, 0.28);
}

.sp-checkout-footer-pay:hover:not(:disabled) {
    background: linear-gradient(180deg, #f56a4f 0%, #f05d40 100%);
}

.sp-checkout-footer-pay:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

.sp-checkout-qty-hint {
    font-size: 0.72rem;
    color: #94a3b8;
    white-space: nowrap;
}

@media (max-width: 380px) {
    .sp-checkout-child-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .sp-checkout-footer-pay {
        min-width: 7rem;
        padding: 0 0.85rem;
        font-size: 0.875rem;
    }

    .sp-cart-footer-end {
        gap: 0.5rem;
    }

    .sp-cart-footer-checkout {
        min-width: 6.5rem;
        padding: 0 0.65rem;
        font-size: 0.8125rem;
    }
}

/* Event detail page — see EventDetail.razor.css for page styles */
.event-detail-page {
    padding-bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px));
}

/* Shopee product bottom bar (event detail) */
.sp-product-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.65rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid #eee;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
}

@media (min-width: 992px) {
    .sp-product-bar {
        left: var(--ew-sidebar-width, 240px);
    }
}

.sp-product-bar-cart {
    position: relative;
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: #f8f8f8;
    color: #555;
    text-decoration: none;
}

.sp-product-bar-cart svg {
    width: 1.2rem;
    height: 1.2rem;
}

.sp-product-bar-actions {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 2.5rem;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(238, 77, 45, 0.18);
}

.sp-product-bar-add,
.sp-product-bar-buy {
    border: none;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0 0.5rem;
    line-height: 1.2;
}

.sp-product-bar-add {
    background: #fff5f0;
    color: #ee4d2d;
    border-right: 1px solid rgba(238, 77, 45, 0.15);
}

.sp-product-bar-add:hover:not(:disabled) {
    background: #ffece4;
}

.sp-product-bar-buy {
    background: linear-gradient(180deg, #f05d40 0%, #ee4d2d 100%);
    color: #fff;
}

.sp-product-bar-buy:hover:not(:disabled) {
    background: linear-gradient(180deg, #f56a4f 0%, #f05d40 100%);
}

.sp-product-bar-add:disabled,
.sp-product-bar-buy:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

@media (min-width: 768px) {
    .sp-cart-bar,
    .sp-product-bar {
        left: var(--ew-sidebar-width, 240px);
    }
}

/* Admin feedback */
.admin-feedback-count {
    margin: 0 0 0.75rem;
}

.admin-feedback-summary,
.admin-feedback-detail-summary {
    margin-top: 0.25rem;
}

.admin-feedback-list-section {
    margin-top: 1rem;
}

.admin-feedback-reviews {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-feedback-review {
    background: var(--ew-surface);
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius);
    padding: 0.9rem 1rem;
}

.admin-feedback-review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.admin-feedback-rating {
    font-weight: 700;
    color: var(--ew-primary);
    white-space: nowrap;
}

.admin-feedback-review-meta {
    margin: 0.2rem 0 0.5rem;
}

.admin-feedback-review-text {
    margin: 0;
    white-space: pre-wrap;
}

/* Admin user referral detail */
.admin-user-detail-name {
    margin: 0;
    font-size: 1.1rem;
}

.admin-user-detail-hero {
    margin-bottom: 0.75rem;
}

.admin-user-detail-loading {
    padding: 0.5rem 0.25rem;
}

.admin-user-detail-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.admin-referrals-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.admin-referrals-stat {
    background: var(--ew-surface);
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius-sm);
    padding: 0.9rem 0.85rem;
    min-height: 5.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.admin-referrals-stat-label {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ew-text-muted);
}

.admin-referrals-stat-value {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ew-text);
    word-break: break-word;
}

.admin-referrals-stat-value--count {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ew-primary);
    line-height: 1;
}

.admin-referrals-stat-sub {
    margin: 0;
    font-size: 0.72rem;
    color: var(--ew-text-muted);
    font-family: ui-monospace, monospace;
    word-break: break-all;
}

.admin-referrals-stat-empty {
    color: #bbb;
    font-weight: 500;
}

.admin-referrals-stat-link {
    color: inherit;
    text-decoration: none;
}

.admin-referrals-stat-link:hover .admin-referrals-stat-value {
    color: var(--ew-primary);
}

.admin-referrals-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.admin-referrals-section-head h3 {
    margin: 0;
    font-size: 0.95rem;
}

.admin-referrals-section-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ew-primary);
    background: #eef2ff;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}

.admin-referrals-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-referrals-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius-sm);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.admin-referrals-item:hover {
    border-color: var(--ew-primary);
    background: #f8fafc;
}

.admin-referrals-item-initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    background: #eef2ff;
    color: var(--ew-primary-dark);
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.admin-referrals-item-name {
    margin: 0;
    font-weight: 600;
    font-size: 0.9rem;
}

.admin-referrals-item-meta {
    margin: 0.15rem 0 0;
    font-size: 0.78rem;
    color: var(--ew-text-muted);
}

.admin-referrals-empty {
    margin: 0;
    padding: 0.25rem 0;
}

/* Student points */
.student-points-section-header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.5rem 1.5rem 1rem;
}

.student-points-section-title,
.student-points-subtitle {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.student-points-balance-card {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin: 0 1.5rem 1rem;
    padding: 1.25rem 1rem;
    border-radius: var(--ew-radius);
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
}

.student-points-balance-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    color: #1d4ed8;
}

.student-points-balance-label {
    font-size: 1rem;
    color: #475569;
}

.student-points-txn-table-wrap {
    overflow-x: auto;
    padding: 0 1.5rem 1.25rem;
}

.student-points-txn-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.student-points-txn-table th,
.student-points-txn-table td {
    padding: 0.55rem 0.45rem;
    text-align: left;
    border-bottom: 1px solid var(--ew-border);
    vertical-align: top;
}

.student-points-txn-table th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ew-text-muted);
}

.student-points-positive {
    color: #15803d;
    font-weight: 600;
}

.student-points-negative {
    color: #b91c1c;
    font-weight: 600;
}

.admin-students-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-student-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.35rem 1rem;
    padding: 0.85rem 1rem;
    border-radius: var(--ew-radius);
    border: 1px solid var(--ew-border);
    background: var(--ew-surface);
    text-decoration: none;
    color: inherit;
}

.admin-student-row:hover {
    border-color: #93c5fd;
    background: #f8fbff;
}

.admin-student-row-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-student-row-points {
    grid-row: 1 / span 2;
    grid-column: 2;
    align-self: center;
    text-align: right;
}

.admin-student-points-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1d4ed8;
}

.admin-student-points-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.admin-student-points-balance {
    text-align: right;
}

.admin-student-points-balance-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #1d4ed8;
    line-height: 1;
}

.admin-student-adjust-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.admin-student-point-direction {
    display: flex;
    gap: 0.35rem;
}

.admin-student-point-direction-btn {
    flex: 1 1 0;
    min-height: 2.35rem;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius-sm);
    background: #fff;
    color: #475569;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

.admin-student-point-direction-btn:hover {
    background: #f8fafc;
    color: #334155;
}

.admin-student-point-direction-btn--active {
    border-color: var(--ew-primary);
    background: rgba(74, 99, 216, 0.08);
    color: var(--ew-primary);
}

.admin-student-point-direction-btn--active:hover {
    background: rgba(74, 99, 216, 0.12);
    color: var(--ew-primary-dark);
}

.admin-student-points-form-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-student-points-actions {
    white-space: nowrap;
}

.admin-student-points-delete {
    color: #dc2626;
}

/* Admin transaction logs — shared shell (agent + point CRUD) */
.admin-transaction-logs-panel {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.admin-transaction-logs-panel > * {
    min-width: 0;
}

.admin-txn-logs-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.admin-txn-logs-header h2 {
    margin: 0 0 0.2rem;
}

.admin-txn-logs-header .meta {
    margin: 0;
    max-width: 36rem;
}

.admin-txn-logs-count {
    flex-shrink: 0;
    align-self: flex-start;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    padding: 0.3rem 0.65rem;
    background: #f1f5f9;
    border-radius: 999px;
    white-space: nowrap;
}

.admin-txn-logs-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius-sm);
    background: #fff;
}

.admin-txn-logs-toolbar-meta {
    display: none;
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.admin-txn-logs-toolbar-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.65rem;
}

.admin-txn-logs-toolbar-row--dates {
    gap: 0.5rem;
}

.admin-txn-logs-toolbar-row--filters {
    padding-top: 0.75rem;
    border-top: 1px solid var(--ew-border);
}

.admin-txn-logs-field {
    margin: 0;
}

.admin-txn-logs-field label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.admin-txn-logs-field--date {
    flex: 0 1 9.5rem;
    min-width: 8.5rem;
}

.admin-txn-logs-field--type {
    flex: 0 1 12rem;
    min-width: 10rem;
}

.admin-txn-logs-field--search {
    flex: 1 1 14rem;
    min-width: 12rem;
}

.admin-txn-logs-date-sep {
    align-self: flex-end;
    padding-bottom: 0.55rem;
    color: #94a3b8;
    font-size: 0.875rem;
    user-select: none;
}

.admin-txn-logs-apply {
    align-self: flex-end;
    min-width: 5.5rem;
    margin-left: 0.15rem;
}

@media (max-width: 768px) {
    .admin-transaction-logs-panel {
        gap: 0.65rem;
        margin-left: -0.35rem;
        margin-right: -0.35rem;
    }

    .admin-txn-logs-header {
        display: none;
    }

    .admin-txn-logs-toolbar {
        padding: 0.65rem 0.75rem;
        gap: 0.55rem;
    }

    .admin-txn-logs-toolbar-meta {
        display: block;
    }

    .admin-txn-logs-toolbar-row--dates {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
        align-items: end;
        gap: 0.45rem;
    }

    .admin-txn-logs-date-sep {
        display: none;
    }

    .admin-txn-logs-field--date {
        min-width: 0;
        width: auto;
    }

    .admin-txn-logs-field label {
        font-size: 0.65rem;
        margin-bottom: 0.15rem;
    }

    .admin-txn-logs-toolbar .form-control {
        min-height: 2.35rem;
        padding: 0.35rem 0.45rem;
        font-size: 0.8125rem;
    }

    .admin-txn-logs-apply {
        width: auto;
        min-width: 0;
        margin: 0;
        padding: 0.45rem 0.75rem;
        font-size: 0.8125rem;
        align-self: end;
    }

    .admin-txn-logs-toolbar-row--filters {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 0.45rem;
        padding-top: 0.55rem;
    }

    .admin-txn-logs-field--type,
    .admin-txn-logs-field--search {
        min-width: 0;
        width: auto;
    }

    .admin-txn-logs-field--search {
        grid-column: 1 / -1;
    }
}

@media (max-width: 380px) {
    .admin-txn-logs-toolbar-row--dates {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .admin-txn-logs-apply {
        grid-column: 1 / -1;
        width: 100%;
    }
}

@media (max-width: 640px) {
    .admin-student-adjust-grid {
        grid-template-columns: 1fr;
    }
}

.admin-point-category-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.admin-point-category-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-radius: var(--ew-radius);
    border: 1px solid var(--ew-border);
    background: var(--ew-surface);
}

.admin-point-category-item.is-inactive {
    opacity: 0.65;
}

.admin-point-category-actions {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

.admin-point-form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.admin-point-msg {
    margin-bottom: 0.75rem;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.admin-point-active-toggle {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0.5rem 0;
}

.admin-daily-reward-config-table-wrap {
    overflow-x: auto;
}

.admin-daily-reward-config-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.admin-daily-reward-config-table th,
.admin-daily-reward-config-table td {
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid var(--ew-border);
    text-align: left;
    vertical-align: middle;
}

.admin-daily-reward-config-table th {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ew-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.admin-daily-reward-input {
    width: 5.5rem;
    min-width: 4.5rem;
    padding: 0.35rem 0.5rem;
}

/* ── Community Forum (student) ── */
.forum-page {
    margin: -1rem -1.15rem -1.25rem;
    min-height: calc(100dvh - var(--ew-topbar-height) - 2px);
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0 0.85rem 1.25rem;
}

.forum-guest {
    margin: 1rem;
}

.forum-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0 0.25rem;
    flex-wrap: wrap;
}

.forum-page-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #222;
}

.forum-page-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.forum-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--ew-border);
    text-decoration: none;
    font-size: 1rem;
}

.forum-create-btn {
    font-size: 0.85rem;
    padding: 0.45rem 0.85rem;
}

.forum-search-bar {
    display: flex;
}

.forum-search-input,
.forum-input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius);
    background: #fff;
    font: inherit;
}

.forum-textarea {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius);
    background: #fff;
    font: inherit;
    resize: vertical;
    min-height: 5rem;
}

.forum-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0.65rem 0 0.35rem;
    color: #444;
}

.forum-feed-tabs {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    padding-bottom: 0.15rem;
    -webkit-overflow-scrolling: touch;
}

.forum-feed-tab {
    flex-shrink: 0;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--ew-border);
    color: #555;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
}

.forum-feed-tab--active {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

.forum-category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.forum-category-chip {
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--ew-border);
    color: #555;
    text-decoration: none;
    font-size: 0.78rem;
}

.forum-category-chip--active {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
    font-weight: 600;
}

.forum-post-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.forum-post-card {
    background: #fff;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius);
    overflow: hidden;
}

.forum-post-card--pinned {
    border-color: #93c5fd;
    box-shadow: 0 0 0 1px #dbeafe;
}

.forum-post-card-link {
    display: block;
    padding: 0.85rem 1rem;
    text-decoration: none;
    color: inherit;
}

.forum-post-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.forum-post-card-author {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.forum-post-card-author-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #333;
    text-decoration: none;
}

.forum-post-card-badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
}

.forum-post-card-category {
    font-size: 0.72rem;
    color: #6b7280;
    flex-shrink: 0;
}

.forum-post-card-title {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #111;
    line-height: 1.35;
}

.forum-post-card-preview {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    color: #555;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.forum-post-card-images {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
    overflow-x: auto;
}

.forum-post-card-thumb {
    width: 4.5rem;
    height: 4.5rem;
    object-fit: cover;
    border-radius: 0.35rem;
    flex-shrink: 0;
}

.forum-post-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    font-size: 0.75rem;
    color: #888;
}

.forum-post-card-date {
    margin-left: auto;
}

.forum-load-more {
    align-self: center;
    margin-top: 0.25rem;
}

.forum-detail-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    flex-wrap: wrap;
}

.forum-detail-card {
    background: #fff;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius);
    padding: 1rem;
}

.forum-detail-title {
    margin: 0.5rem 0 0.25rem;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.35;
}

.forum-detail-meta {
    margin: 0 0 0.75rem;
    font-size: 0.78rem;
    color: #888;
}

.forum-detail-content {
    white-space: pre-wrap;
    line-height: 1.55;
    font-size: 0.92rem;
    color: #333;
}

.forum-detail-images {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.forum-detail-image {
    width: 100%;
    max-height: 20rem;
    object-fit: contain;
    border-radius: var(--ew-radius);
    background: #f3f4f6;
}

.forum-detail-image-btn {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    cursor: zoom-in;
    border-radius: var(--ew-radius);
}

.forum-detail-image-btn:focus-visible {
    outline: 2px solid #0079d3;
    outline-offset: 2px;
}

.forum-image-lightbox-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 300;
    cursor: zoom-out;
}

.forum-image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 301;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem 1rem;
    pointer-events: none;
}

.forum-image-lightbox-close {
    position: fixed;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 302;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    pointer-events: auto;
}

.forum-image-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.22);
}

.forum-image-lightbox-img {
    max-width: min(100%, 72rem);
    max-height: calc(100vh - 3rem);
    object-fit: contain;
    border-radius: var(--ew-radius);
    pointer-events: auto;
}

.forum-image-lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 302;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.forum-image-lightbox-nav:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.22);
}

.forum-image-lightbox-nav:disabled {
    opacity: 0.3;
    cursor: default;
}

.forum-image-lightbox-nav--prev {
    left: 0.75rem;
}

.forum-image-lightbox-nav--next {
    right: 0.75rem;
}

.forum-image-lightbox-count {
    position: fixed;
    top: 0.85rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 302;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    pointer-events: none;
}

.forum-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid #eee;
}

.forum-action-btn {
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--ew-border);
    background: #fff;
    font-size: 0.8rem;
    cursor: pointer;
}

.forum-action-btn--active {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.forum-action-btn--danger {
    color: #b91c1c;
    border-color: #fecaca;
}

.forum-replies-section {
    margin-top: 0.25rem;
}

.forum-replies-title {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.forum-reply-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.forum-reply-card {
    background: #fff;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius);
    padding: 0.75rem 0.85rem;
}

.forum-reply-card--link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.forum-reply-content {
    margin: 0.35rem 0;
    font-size: 0.88rem;
    line-height: 1.45;
    white-space: pre-wrap;
}

.forum-reply-meta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.75rem;
    color: #888;
}

.forum-reply-like,
.forum-reply-delete {
    border: none;
    background: none;
    padding: 0;
    font-size: 0.75rem;
    color: #6b7280;
    cursor: pointer;
}

.forum-reply-form {
    margin-top: 0.65rem;
}

.forum-form-card {
    background: #fff;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius);
    padding: 1rem;
}

.forum-file-input {
    font-size: 0.85rem;
}

.forum-upload-preview-list {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.forum-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 200;
}

.forum-modal {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 201;
    width: min(24rem, calc(100vw - 2rem));
    background: #fff;
    border-radius: var(--ew-radius);
    padding: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.forum-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.forum-activity-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.forum-activity-tab {
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--ew-border);
    background: #fff;
    font-size: 0.78rem;
    cursor: pointer;
}

.forum-activity-tab--active {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

.forum-section-title {
    margin: 0.5rem 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.forum-profile-card {
    background: #fff;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.forum-profile-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #555;
}

.forum-follow-btn {
    align-self: flex-start;
    font-size: 0.85rem;
}

.forum-user-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.forum-user-list-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 0.85rem;
    background: #fff;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius);
    text-decoration: none;
    color: inherit;
}

.forum-user-list-name {
    font-weight: 600;
    font-size: 0.88rem;
}

.forum-notification-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.forum-notification-item {
    background: #fff;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius);
    padding: 0.75rem 0.85rem;
    font-size: 0.85rem;
}

.forum-notification-item--unread {
    border-color: #93c5fd;
    background: #f8fafc;
}

.forum-notification-link {
    color: inherit;
    text-decoration: none;
}

.forum-mark-read {
    margin-left: auto;
    font-size: 0.78rem;
}

/* ── Community Forum (admin) ── */
.admin-forum-panel {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.admin-forum-posts-panel {
    background: var(--ew-surface);
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius);
    padding: 0.85rem 1rem;
    box-shadow: var(--ew-shadow);
}

.admin-forum-posts-toolbar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    margin-bottom: 0.65rem;
}

.admin-forum-posts-toolbar .admin-forum-search-wrap {
    flex: 1 1 0;
    min-width: 0;
}

.admin-forum-posts-panel .admin-forum-result-count {
    margin: -0.35rem 0 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
}

.admin-forum-filter-more {
    position: relative;
    flex-shrink: 0;
}

.admin-forum-filter-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius-sm);
    background: #fff;
    color: #64748b;
    font-size: 1.1rem;
    line-height: 1;
    letter-spacing: 0.08em;
    cursor: pointer;
    flex-shrink: 0;
}

.admin-forum-filter-more-btn:hover,
.admin-forum-filter-more-btn[aria-expanded="true"] {
    border-color: #94a3b8;
    color: var(--ew-primary);
    background: #f8fafc;
}

.admin-forum-filter-more-menu {
    right: 0;
    left: auto;
}

.admin-forum-filter-more-menu .admin-forum-post-more-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.admin-forum-toolbar--compact {
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.55rem;
    margin-bottom: 0.15rem;
}

.admin-forum-refresh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius-sm);
    background: #fff;
    color: #64748b;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.admin-forum-refresh-btn:hover {
    border-color: #94a3b8;
    color: var(--ew-primary);
    background: #f8fafc;
}

.admin-forum-search-wrap {
    display: flex;
    align-items: center;
    flex: 1 1 12rem;
    min-width: 0;
    border: 1px solid var(--ew-border);
    border-radius: 999px;
    background: #fff;
    overflow: hidden;
}

.admin-forum-search-wrap:focus-within {
    border-color: var(--ew-primary);
    box-shadow: 0 0 0 2px rgba(74, 99, 216, 0.12);
}

.admin-forum-search-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.42rem 0.55rem 0.42rem 0.75rem;
    border: none;
    background: transparent;
    font: inherit;
    font-size: 0.86rem;
    color: #1e293b;
}

.admin-forum-search-input:focus {
    outline: none;
}

.admin-forum-search-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin-right: 0.2rem;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: var(--ew-primary);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.admin-forum-search-submit:hover {
    background: var(--ew-primary-dark);
}

.admin-forum-toolbar--compact .admin-forum-result-count {
    flex-shrink: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
}

.admin-forum-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.65rem 0.85rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius);
    background: #f8fafc;
}

.admin-forum-filter {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 9rem;
}

.admin-forum-filter--grow {
    flex: 1 1 14rem;
    min-width: 12rem;
}

.admin-forum-filter-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #64748b;
}

.admin-forum-filter-input {
    width: 100%;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--ew-border);
    border-radius: 8px;
    background: #fff;
    font: inherit;
    font-size: 0.88rem;
    color: #1e293b;
}

.admin-forum-filter-input:focus {
    outline: none;
    border-color: #0079d3;
    box-shadow: 0 0 0 2px rgba(0, 121, 211, 0.12);
}

.admin-forum-result-count {
    margin-left: auto;
    align-self: center;
    font-size: 0.8rem;
    color: #64748b;
    white-space: nowrap;
}

.admin-forum-empty {
    text-align: center;
    color: #64748b;
}

.admin-forum-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-forum-filters .forum-input {
    flex: 1 1 10rem;
    max-width: 16rem;
}

.admin-forum-post-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.admin-forum-post-table {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.admin-forum-post-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.95rem 1rem;
    border: 1px solid var(--ew-border);
    border-radius: 12px;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.admin-forum-post-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.admin-forum-post-card--hidden {
    background: #fffbeb;
    border-color: #fde68a;
}

.admin-forum-post-card--deleted {
    background: #fef2f2;
    border-color: #fecaca;
    opacity: 0.92;
}

.admin-forum-post-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.admin-forum-post-card-heading {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

.admin-forum-post-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.35;
    color: #0f172a;
    text-decoration: none;
}

.admin-forum-post-title:hover {
    color: #0079d3;
    text-decoration: underline;
}

.admin-forum-post-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.admin-forum-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.admin-forum-badge--published {
    background: #dcfce7;
    color: #166534;
}

.admin-forum-badge--hidden {
    background: #fef3c7;
    color: #92400e;
}

.admin-forum-badge--deleted {
    background: #fee2e2;
    color: #991b1b;
}

.admin-forum-badge--pin {
    background: #dbeafe;
    color: #1d4ed8;
}

.admin-forum-badge--lock {
    background: #f3e8ff;
    color: #7e22ce;
}

.admin-forum-badge--image {
    background: #e0f2fe;
    color: #0369a1;
}

.admin-forum-badge--thread {
    background: #f1f5f9;
    color: #475569;
}

.admin-forum-post-meta {
    margin: 0;
    font-size: 0.8rem;
    color: #64748b;
}

.admin-forum-post-meta-sep {
    margin: 0 0.2rem;
}

.admin-forum-post-preview {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.45;
    color: #475569;
}

.admin-forum-post-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.65rem;
    margin-top: 0.15rem;
}

.admin-forum-stat {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    background: #f1f5f9;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
}

.admin-forum-stat--warn {
    background: #fff7ed;
    color: #c2410c;
}

.admin-forum-post-more {
    position: relative;
    flex-shrink: 0;
}

.admin-forum-post-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid var(--ew-border);
    border-radius: 8px;
    background: #fff;
    color: #475569;
    font-size: 1.1rem;
    line-height: 1;
    letter-spacing: 0.08em;
    cursor: pointer;
}

.admin-forum-post-more-btn:hover,
.admin-forum-post-more-btn[aria-expanded="true"] {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

.admin-forum-post-more-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 0.35rem);
    z-index: 12;
    min-width: 10.5rem;
    padding: 0.25rem 0;
    background: #fff;
    border: 1px solid var(--ew-border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.admin-forum-post-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 11;
    border: none;
    background: transparent;
    cursor: default;
}

.admin-forum-post-more-item {
    display: block;
    width: 100%;
    padding: 0.55rem 0.85rem;
    border: none;
    background: #fff;
    color: #1e293b;
    font: inherit;
    font-size: 0.84rem;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.admin-forum-post-more-item:hover {
    background: #f8fafc;
}

.admin-forum-post-more-item--danger {
    color: #b91c1c;
}

.admin-forum-post-more-item--danger:hover {
    background: #fef2f2;
}

.admin-forum-post-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius);
    background: var(--ew-surface);
}

.admin-forum-post-main h3 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
}

.admin-forum-post-preview {
    margin: 0.35rem 0;
    font-size: 0.85rem;
    color: #555;
}

.admin-forum-post-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    flex-shrink: 0;
}

.admin-forum-category-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.admin-forum-category-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius);
    background: var(--ew-surface);
}

.admin-forum-form {
    margin-top: 0.5rem;
}

.admin-forum-report-card {
    padding: 0.85rem 1rem;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius);
    background: var(--ew-surface);
}

.admin-forum-activity-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.admin-forum-activity-table th,
.admin-forum-activity-table td {
    padding: 0.5rem 0.65rem;
    border-bottom: 1px solid var(--ew-border);
    text-align: left;
}

.admin-forum-log-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-forum-log-item {
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius);
    background: var(--ew-surface);
    font-size: 0.85rem;
}

.admin-forum-log-item-top {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.admin-forum-log-item-target {
    margin: 0.35rem 0 0;
}

.admin-forum-log-link {
    color: var(--ew-primary);
    text-decoration: none;
    font-weight: 600;
}

.admin-forum-log-link:hover {
    text-decoration: underline;
}

.admin-forum-log-item-meta,
.admin-forum-log-item-notes {
    margin: 0.25rem 0 0;
}

.admin-forum-badge--log {
    font-size: 0.68rem;
}

@media (max-width: 640px) {
    .admin-forum-posts-panel {
        padding: 0.85rem;
    }

    .admin-forum-toolbar {
        padding: 0.75rem;
    }

    .admin-forum-post-card-top {
        flex-direction: row;
    }

    .admin-forum-post-row {
        flex-direction: column;
    }

    .forum-page-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Forum avatar — profile/layout overrides (base styles in ForumAvatar.razor.css) */
.forum-post-card-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.forum-post-card-author-text {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.forum-post-card-content-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.forum-post-card-actions {
    padding: 0 1rem 0.75rem;
}

.forum-post-card-status {
    color: #b45309;
    font-weight: 600;
}

.forum-profile-hero {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
}

.forum-profile-hero-text {
    flex: 1;
    min-width: 0;
}

.forum-profile-name {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
}

.forum-profile-bio {
    margin: 0.35rem 0 0;
    font-size: 0.88rem;
    color: #555;
    line-height: 1.45;
}

.forum-profile-stats a {
    color: #1d4ed8;
    text-decoration: none;
}

.forum-profile-edit-avatar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.forum-student-card-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.forum-student-card {
    display: flex;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: #fff;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius);
}

.forum-student-card-body {
    flex: 1;
    min-width: 0;
}

.forum-student-card-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.forum-student-card-name {
    font-weight: 600;
    color: #111;
    text-decoration: none;
}

.forum-student-card-bio {
    margin: 0.35rem 0;
    font-size: 0.85rem;
    color: #555;
    line-height: 1.4;
}

.forum-student-card-meta {
    margin: 0;
    font-size: 0.78rem;
    color: #888;
}

.forum-student-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.forum-empty-following {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
}

.forum-user-list-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Reddit forum theme */
.forum-page--reddit {
    max-width: 1000px;
    margin: 0 auto;
}

.forum-page-header--reddit {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.forum-page-header--reddit .forum-page-title {
    grid-column: 1;
    white-space: nowrap;
    font-size: 1.05rem;
}

.forum-search-bar--inline {
    grid-column: 2;
    min-width: 0;
}

.forum-page-header--reddit .forum-page-actions {
    grid-column: 3;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.forum-page-header--reddit .forum-icon-btn {
    flex-shrink: 0;
}

.forum-icon-btn--create {
    background: #bfdbfe;
    border-color: #93c5fd;
    color: #1d4ed8;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
}

.forum-icon-btn--create:hover {
    background: #93c5fd;
    border-color: #60a5fa;
    color: #1e3a8a;
}

.forum-search-input--reddit {
    width: 100%;
    padding: 0.55rem 0.85rem;
    border: 1px solid #edeff1;
    border-radius: 999px;
    background: #f6f7f8;
    font-size: 0.9rem;
}

.forum-search-input--reddit:focus {
    outline: none;
    border-color: #0079d3;
    background: #fff;
}

.forum-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 1.25rem;
    align-items: start;
    margin-top: 0.75rem;
}

.forum-main {
    min-width: 0;
}

.forum-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: 1rem;
}

.forum-sidebar-card {
    background: var(--ew-surface-raised, #fff);
    border: 1px solid #edeff1;
    border-radius: var(--ew-radius, 8px);
    padding: 1rem;
}

.forum-sidebar-title {
    margin: 0 0 0.75rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #878a8c;
}

.forum-sidebar-list {
    list-style: none;
    margin: 0 0 0.75rem;
    padding: 0;
}

.forum-sidebar-list li {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    padding: 0.35rem 0;
    font-size: 0.85rem;
}

.forum-sidebar-link {
    color: #1a1a1b;
    font-weight: 600;
    text-decoration: none;
}

.forum-sidebar-link:hover {
    text-decoration: underline;
}

.forum-sidebar-link-name {
    color: #7c7c7c;
    font-size: 0.78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-sidebar-create {
    display: block;
    width: 100%;
    text-align: center;
}

.forum-sidebar-about p {
    margin: 0;
    font-size: 0.85rem;
    color: #555;
    line-height: 1.45;
}

.forum-sortbar {
    display: flex;
    align-items: center;
    gap: 0;
    background: #fff;
    border: 1px solid #edeff1;
    border-radius: var(--ew-radius, 8px);
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.forum-sort {
    flex: 1;
    text-align: center;
    padding: 0.65rem 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #878a8c;
    text-decoration: none;
    border-right: 1px solid #edeff1;
}

.forum-sort:last-child {
    border-right: none;
}

.forum-sort:hover {
    background: #f6f7f8;
    color: #1a1a1b;
}

.forum-sort--active {
    color: #1a1a1b;
    background: #f6f7f8;
    box-shadow: inset 0 -2px 0 #ff4500;
}

.forum-category-chips--mobile {
    display: none;
    margin-bottom: 0.75rem;
}

.forum-post-list--reddit {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.forum-card {
    display: flex;
    gap: 0.5rem;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: var(--ew-radius, 4px);
    padding: 0.5rem 0.65rem;
    transition: border-color 0.15s ease;
}

.forum-card:hover {
    border-color: #898989;
}

.forum-card--pinned {
    border-left: 3px solid #ff4500;
}

.forum-card-body {
    flex: 1;
    min-width: 0;
}

.forum-card-inner {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.forum-card-content {
    flex: 1;
    min-width: 0;
}

.forum-card-title-link,
.forum-card-preview-link {
    color: inherit;
    text-decoration: none;
}

.forum-card-title-link:hover .forum-card-title {
    color: #0079d3;
}

.forum-card-meta {
    margin: 0 0 0.25rem;
    font-size: 0.72rem;
    color: #787c7e;
    line-height: 1.4;
}

.forum-card-author,
.forum-card-community {
    color: #1a1a1b;
    font-weight: 600;
    text-decoration: none;
}

.forum-card-author:hover,
.forum-card-community:hover {
    text-decoration: underline;
}

.forum-card-title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.3;
    color: #1a1a1b;
}

.forum-card-preview {
    margin: 0;
    font-size: 0.85rem;
    color: #1a1a1b;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.forum-card-thumb-link {
    flex-shrink: 0;
}

.forum-card-thumb {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
    background: #f6f7f8;
}

.forum-card-media-link {
    display: block;
    margin-top: 0.5rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #edeff1;
    background: #f6f7f8;
}

.forum-card-media {
    display: block;
    width: 100%;
    max-height: 320px;
    object-fit: cover;
}

.forum-card-actionbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-top: 0.45rem;
    font-size: 0.75rem;
    color: #878a8c;
}

.forum-comment-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    font-weight: 600;
    color: #878a8c;
    text-decoration: none;
}

.forum-comment-pill:hover {
    background: #f6f7f8;
    color: #1a1a1b;
}

.forum-card-stat {
    color: #878a8c;
}

.forum-vote {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    padding: 0.25rem 0.15rem 0.15rem;
    flex-shrink: 0;
}

.forum-vote--compact {
    flex-direction: row;
    gap: 0.35rem;
    padding: 0;
}

.forum-vote--compact .forum-vote-score {
    min-width: auto;
    font-size: 0.72rem;
}

.forum-vote-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: none;
    border-radius: 2px;
    background: transparent;
    color: #878a8c;
    cursor: pointer;
    line-height: 1;
}

.forum-vote-btn:hover:not(:disabled) {
    background: #f6f7f8;
}

.forum-vote-btn--active {
    color: #ff4500;
}

.forum-vote-btn--down {
    cursor: not-allowed;
    opacity: 0.45;
}

.forum-vote-icon {
    font-size: 0.65rem;
    line-height: 1;
}

.forum-vote-score {
    font-size: 0.72rem;
    font-weight: 700;
    color: #1a1a1b;
    min-width: 1.25rem;
    text-align: center;
    line-height: 1.2;
}

.forum-detail-card--reddit {
    display: flex;
    gap: 0.5rem;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: var(--ew-radius, 4px);
    padding: 0.75rem 1rem;
}

.forum-detail-main {
    flex: 1;
    min-width: 0;
    position: relative;
}

.forum-detail-main-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.forum-detail-main-top .forum-detail-meta--reddit {
    flex: 1;
    min-width: 0;
    margin-bottom: 0.5rem;
}

.forum-detail-more {
    position: relative;
    flex-shrink: 0;
}

.forum-detail-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #878a8c;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.05em;
    cursor: pointer;
}

.forum-detail-more-btn:hover {
    background: #f6f7f8;
    color: #1a1a1b;
}

.forum-detail-more-menu {
    top: calc(100% + 0.15rem);
    right: 0;
    z-index: 10;
}

.forum-detail-meta--reddit {
    margin: 0 0 0.5rem;
    font-size: 0.78rem;
    color: #787c7e;
}

.forum-detail-actions--reddit {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid #edeff1;
}

.forum-detail-stat {
    font-size: 0.78rem;
    color: #878a8c;
}

.forum-detail-stat-sep {
    font-size: 0.78rem;
    color: #878a8c;
    margin: 0 0.35rem;
}

.forum-replies-section--reddit {
    margin-top: 1rem;
}

.forum-replies-section--reddit .forum-replies-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
    color: #1a1a1b;
}

.forum-reply-form--reddit {
    background: #fff;
    border: 1px solid #edeff1;
    border-radius: var(--ew-radius, 4px);
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.forum-comment-composer-wrap {
    position: relative;
    border: 1px solid #edeff1;
    border-radius: 8px;
    background: #fff;
}

.forum-comment-composer-wrap:focus-within {
    border-color: #0079d3;
}

.forum-comment-composer-row {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
}

.forum-comment-composer {
    display: block;
    width: 100%;
    min-width: 0;
    margin-bottom: 0;
    border: none;
    border-radius: 8px;
    padding: 0.65rem 2.75rem 0.65rem 0.75rem;
    font-family: inherit;
    font-size: 0.9rem;
    resize: none;
    overflow-y: auto;
    min-height: 2.5rem;
    max-height: 7rem;
    field-sizing: content;
    line-height: 1.4;
}

.forum-comment-composer:focus {
    outline: none;
}

.forum-comment-send {
    position: absolute;
    right: 0.35rem;
    bottom: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: #0079d3;
    color: #fff;
    cursor: pointer;
}

.forum-comment-send:hover:not(:disabled) {
    background: #006cbd;
}

.forum-comment-send:disabled {
    background: #edeff1;
    color: #878a8c;
    cursor: not-allowed;
}

.forum-comment-send-icon {
    width: 1.15rem;
    height: 1.15rem;
}

.forum-comment-send-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: forum-create-spin 0.7s linear infinite;
}

.forum-comment-composer-error {
    margin: 0.5rem 0 0;
    font-size: 0.82rem;
}

.forum-comment {
    display: flex;
    gap: 0.5rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid #edeff1;
}

.forum-comment-body {
    flex: 1;
    min-width: 0;
}

.forum-comment-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.35rem;
    margin-bottom: 0.25rem;
    font-size: 0.78rem;
}

.forum-comment-header-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
    flex: 1;
}

.forum-comment-more {
    position: relative;
    flex-shrink: 0;
}

.forum-comment-more-btn {
    padding: 0 0.2rem;
    border: none;
    background: transparent;
    color: #787c7e;
    font-size: 0.95rem;
    line-height: 1;
    letter-spacing: 0.04em;
    cursor: pointer;
}

.forum-comment-more-btn:hover {
    color: #1a1a1b;
}

.forum-comment-more-menu {
    right: 0;
    top: calc(100% + 0.15rem);
    min-width: 9rem;
}

.forum-comment-author {
    font-weight: 700;
    color: #1a1a1b;
    text-decoration: none;
}

.forum-comment-author:hover {
    text-decoration: underline;
}

.forum-comment-time {
    color: #787c7e;
}

.forum-comment-text {
    margin: 0 0 0.35rem;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #1a1a1b;
    white-space: pre-wrap;
}

.forum-comment-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.forum-comment-reply-btn {
    padding: 0;
    border: none;
    background: transparent;
    color: var(--ew-text-muted);
    font: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.forum-comment-reply-btn:hover {
    color: var(--ew-text);
}

.forum-comment--depth-2 {
    margin-left: 1.75rem;
    padding-left: 0.35rem;
    border-bottom: none;
}

.forum-comment--depth-3 {
    margin-left: 3.25rem;
    padding-left: 0.35rem;
    border-bottom: none;
}

.forum-comment-reply-form {
    margin-top: 0.45rem;
}

.forum-comment-replying-to {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    color: var(--ew-text-muted);
}

.forum-comment-replying-to strong {
    color: var(--ew-text);
    font-weight: 600;
}

.forum-comment-composer-wrap--nested {
    margin-top: 0;
}

.forum-comment-reply-cancel {
    margin-top: 0.35rem;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--ew-text-muted);
    font: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
}

.forum-comment-reply-cancel:hover {
    color: var(--ew-text);
}

@media (max-width: 900px) {
    .forum-shell {
        grid-template-columns: 1fr;
    }

    .forum-sidebar-tab {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        right: 0;
        top: 50%;
        z-index: 210;
        transform: translateY(-50%);
        min-height: 5.5rem;
        padding: 0.65rem 0.45rem;
        border: 1px solid #edeff1;
        border-right: none;
        border-radius: 8px 0 0 8px;
        background: #fff;
        color: #1a1a1b;
        font: inherit;
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        cursor: pointer;
        box-shadow: -2px 0 12px rgba(15, 23, 42, 0.08);
        writing-mode: vertical-rl;
        text-orientation: mixed;
    }

    .forum-sidebar-tab--open {
        right: min(88vw, 320px);
        border-right: 1px solid #edeff1;
        border-radius: 8px 0 0 8px;
        writing-mode: horizontal-tb;
        min-height: auto;
        min-width: 2rem;
        padding: 0.55rem 0.35rem;
    }

    .forum-sidebar-tab-icon {
        font-size: 1.25rem;
        line-height: 1;
        font-weight: 400;
    }

    .forum-sidebar-tab-label {
        line-height: 1.2;
    }

    .forum-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 200;
        margin: 0;
        padding: 0;
        border: none;
        background: rgba(15, 23, 42, 0.4);
        cursor: pointer;
    }

    .forum-sidebar--reddit {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 205;
        width: min(88vw, 320px);
        margin: 0;
        padding: 1rem 0.85rem 1.5rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        background: #f6f7f8;
        border-left: 1px solid #edeff1;
        box-shadow: -8px 0 32px rgba(15, 23, 42, 0.12);
        transform: translateX(100%);
        transition: transform 0.22s ease;
        visibility: hidden;
        pointer-events: none;
    }

    .forum-sidebar--reddit.forum-sidebar--open {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }

    .forum-main {
        order: 1;
    }

    .forum-feed-toolbar-row--filters {
        flex-direction: column;
        align-items: stretch;
    }

    .forum-category-select {
        width: 100%;
    }
}

@media (min-width: 901px) {
    .forum-sidebar-tab,
    .forum-sidebar-backdrop {
        display: none;
    }
}

/* Forum feed v2 — center + right sidebar */
.forum-page--reddit {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 0.5rem;
}

.forum-feed-toolbar-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.forum-student-search-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex: 1;
    min-width: 0;
    padding: 0.5rem 0.75rem;
    border: 1px solid #edeff1;
    border-radius: 999px;
    background: #f6f7f8;
    font: inherit;
    font-size: 0.82rem;
    color: #878a8c;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    box-sizing: border-box;
}

.forum-student-search-trigger:hover {
    background: #fff;
    border-color: #dbdbdb;
    color: #262626;
}

.forum-student-search-trigger-icon {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    color: #878a8c;
}

.forum-student-search-trigger-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-search-input--posts {
    flex: 1.15;
    min-width: 0;
}

.forum-student-search-page {
    padding: 0 1rem 1rem;
}

.forum-student-search-page-card {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    min-height: min(70vh, 640px);
    display: flex;
    flex-direction: column;
}

.forum-student-search-page-card--explore {
    min-height: auto;
    padding: 0.25rem 0 1rem;
    gap: 0.5rem;
}

.forum-student-search-header {
    padding: 0.35rem 0.15rem 0.15rem;
}

.forum-student-search-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ew-text);
}

.forum-student-search-lead {
    margin: 0.25rem 0 0;
    font-size: 0.8125rem;
    color: var(--forum-muted, #64748b);
}

.forum-student-search-page-card .ig-follow-search-wrap {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
}

.forum-student-search-page-card .ig-follow-row {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
}

.forum-student-search-page-card .forum-student-search-hint,
.forum-student-search-page-card .ig-follow-empty,
.forum-student-search-page-card .ig-follow-loading {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
}

.forum-student-search-page-card .forum-student-search-list {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
}

.forum-student-search-panel-inner {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.forum-student-search-hint {
    padding: 2rem 1.25rem;
    color: #8e8e8e;
    font-size: 0.88rem;
    line-height: 1.45;
}

.forum-student-search-hint--error {
    color: #b91c1c;
}

.forum-student-search-header-spacer {
    width: 2rem;
}

.forum-student-search-more {
    display: block;
    width: calc(100% - 2rem);
    margin: 0.5rem 1rem 1rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    background: #fafafa;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: #262626;
    cursor: pointer;
}

.forum-student-search-more:hover:not(:disabled) {
    background: #f0f0f0;
}

.forum-student-search-more:disabled {
    opacity: 0.6;
    cursor: default;
}

/* Learner bottom nav — layout padding (nav styles in LearnerBottomNav.razor.css) */
:root {
    --learner-bottom-nav-height: 4.5rem;
    --ig-profile-logout-bar-height: 4.25rem;
}

.app-main--learner-nav .app-content {
    padding-bottom: calc(var(--learner-bottom-nav-height) + env(safe-area-inset-bottom, 0px));
}

.app-topbar-learner-brand {
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ew-primary-dark);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 10rem;
}

.app-topbar-learner-brand:hover {
    color: var(--ew-primary);
}

.app-topbar--learner-profile {
    gap: 0.5rem;
}

.app-topbar--learner-profile .app-topbar-start {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.app-topbar--learner-profile .app-topbar-learner-brand {
    max-width: 6.5rem;
}

.app-topbar--learner-profile .app-page-title {
    flex-shrink: 1;
    min-width: 0;
}

.app-topbar--learner-profile .app-topbar-end {
    gap: 0.35rem;
}

.app-topbar--learner-rewards .app-topbar-start {
    flex: 1;
    min-width: 0;
}

.app-topbar-rewards-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.app-topbar-points-balance {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ew-text);
    line-height: 1;
    white-space: nowrap;
}

.app-topbar-rewards-shop-btn {
    flex-shrink: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1;
    color: var(--ew-text);
    text-decoration: none;
    padding: 0.4rem 0.7rem;
    border: 1px solid var(--ew-border-strong);
    border-radius: var(--ew-radius-sm);
    background: #fff;
    white-space: nowrap;
}

.app-topbar-rewards-shop-btn:hover {
    color: var(--ew-primary);
    border-color: var(--ew-primary);
}

.app-topbar-rewards-shop-btn--current {
    color: var(--ew-text-muted);
    pointer-events: none;
}

.app-main--learner-nav .app-content:has(.ig-profile-page) {
    padding-left: 0;
    padding-right: 0;
    padding-top: 0;
    padding-bottom: calc(var(--learner-bottom-nav-height) + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    min-height: calc(100dvh - var(--ew-topbar-height, 3.25rem));
}

@media (max-width: 900px) {
    .forum-student-search-trigger {
        display: none;
    }
}

.forum-student-search-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 600px) {
    .forum-search-input--posts {
        flex: 1;
    }
}

@media (min-width: 601px) {
    .forum-student-search-trigger {
        max-width: 14rem;
    }
}

.forum-card-action {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.3rem 0.55rem;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #878a8c;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.forum-card-action:hover {
    background: #f6f7f8;
    color: #1a1a1b;
}

.forum-card-action--active {
    color: #ff4500;
}

.forum-card-action--stat {
    cursor: default;
}

.forum-card-more {
    position: relative;
    margin-left: auto;
}

.forum-card-more-btn {
    min-width: 2rem;
    justify-content: center;
}

.forum-card-more-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 0.25rem);
    z-index: 5;
    min-width: 8rem;
    background: #fff;
    border: 1px solid #edeff1;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.forum-card-more-item {
    display: block;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: none;
    background: #fff;
    color: #1a1a1b;
    font: inherit;
    font-size: 0.82rem;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.forum-card-more-item:hover {
    background: #f6f7f8;
}

.forum-card-more-item--danger {
    color: #b91c1c;
}

.forum-sidebar--reddit {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.forum-sidebar-card--loading {
    padding: 1rem;
    font-size: 0.85rem;
    color: #878a8c;
}

.forum-sidebar-list--stats li {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #edeff1;
}

.forum-sidebar-list--stats li:last-child {
    border-bottom: none;
}

.forum-sidebar-stat-line {
    font-size: 0.78rem;
    color: #787c7e;
}

.forum-sidebar-meta {
    font-size: 0.72rem;
    color: #878a8c;
}

.forum-sidebar-posts,
.forum-sidebar-contributors {
    list-style: none;
    margin: 0;
    padding: 0;
}

.forum-sidebar-posts li,
.forum-sidebar-contributors li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #edeff1;
}

.forum-sidebar-posts li:last-child,
.forum-sidebar-contributors li:last-child {
    border-bottom: none;
}

.forum-sidebar-post-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a1a1b;
    text-decoration: none;
    line-height: 1.35;
    margin-bottom: 0.15rem;
}

.forum-sidebar-post-title:hover {
    color: #0079d3;
}

.forum-sidebar-contributor {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    margin-bottom: 0.15rem;
}

.forum-sidebar-contributor-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a1a1b;
}

.forum-sidebar-link-all {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #0079d3;
    text-decoration: none;
}

.forum-sidebar-expand-btn {
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.forum-sidebar-expand-btn:hover {
    text-decoration: underline;
}

.forum-find-panel {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #edeff1;
}

.forum-find-panel-search {
    width: 100%;
    padding: 0.45rem 0.65rem;
    border: 1px solid #edeff1;
    border-radius: 8px;
    background: #f6f7f8;
    font-size: 0.78rem;
    box-sizing: border-box;
}

.forum-find-panel-search:focus {
    outline: none;
    border-color: #0079d3;
    background: #fff;
}

.forum-find-panel-list {
    list-style: none;
    margin: 0.65rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 320px;
    overflow-y: auto;
}

.forum-find-panel-list .ig-follow-row {
    padding: 0.35rem 0;
    gap: 0.5rem;
}

.forum-find-panel-list .forum-avatar--md {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.72rem;
}

.forum-find-panel-list .ig-follow-username {
    font-size: 0.78rem;
}

.forum-find-panel-list .ig-follow-subtitle {
    font-size: 0.68rem;
}

.forum-find-panel-list .ig-follow-btn {
    min-width: 4.5rem;
    padding: 0.3rem 0.5rem;
    font-size: 0.68rem;
}

.forum-find-panel-status {
    margin: 0.65rem 0 0;
    font-size: 0.78rem;
    color: #878a8c;
    text-align: center;
}

.forum-find-panel-status--error {
    color: #b91c1c;
}

.forum-find-panel-more {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.4rem;
    border: 1px solid #edeff1;
    border-radius: 8px;
    background: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    color: #0079d3;
    cursor: pointer;
}

.forum-find-panel-more:hover:not(:disabled) {
    background: #f6f7f8;
}

.forum-find-panel-more:disabled {
    opacity: 0.6;
    cursor: wait;
}

.forum-sidebar-suggest-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.forum-sidebar-suggest-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.25rem 0;
    text-decoration: none;
    color: inherit;
}

.forum-sidebar-suggest-item:hover .forum-sidebar-suggest-name {
    color: #0079d3;
}

.forum-sidebar-suggest-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1a1a1b;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-sidebar-students {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.forum-student-card--compact {
    padding: 0.65rem;
    gap: 0.5rem;
}

.forum-student-card--compact .forum-student-card-bio {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.forum-student-card--compact .forum-student-card-actions {
    flex-wrap: wrap;
}

.forum-vote--compact {
    border: 1px solid #edeff1;
    border-radius: 999px;
    padding: 0.15rem 0.35rem;
    background: #f6f7f8;
}

@media (max-width: 900px) {
    .forum-page-header--reddit {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .forum-page-header--reddit .forum-page-title {
        display: none;
    }

    .forum-search-bar--inline {
        grid-column: 1;
    }

    .forum-page-header--reddit .forum-page-actions {
        grid-column: 2;
    }

    .forum-category-chips--mobile {
        display: flex;
        flex-wrap: wrap;
        gap: 0.35rem;
    }
}


/* Forum image upload gallery (create post strip + admin event form) */
.forum-create-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 1.5rem 1rem;
    border: 2px dashed #c8ccd0;
    border-radius: 8px;
    background: #f6f7f8;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s ease, background 0.15s ease;
    position: relative;
}

.forum-create-dropzone:hover:not(.forum-create-dropzone--busy) {
    border-color: #0079d3;
    background: #f0f8ff;
}

.forum-create-dropzone--busy {
    opacity: 0.7;
    cursor: wait;
}

.forum-create-file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.forum-create-dropzone-icon {
    font-size: 1.75rem;
    line-height: 1;
}

.forum-create-dropzone-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a1b;
}

.forum-create-dropzone-sub {
    font-size: 0.75rem;
    color: #878a8c;
}

.forum-create-gallery {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.6rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    padding: 0.15rem 0.1rem 0.35rem;
    scrollbar-width: thin;
    scrollbar-color: #c8ccd0 transparent;
}

.forum-create-gallery--sorting {
    scroll-snap-type: none;
    cursor: grabbing;
}

.forum-create-gallery::-webkit-scrollbar {
    height: 5px;
}

.forum-create-gallery::-webkit-scrollbar-track {
    background: transparent;
}

.forum-create-gallery::-webkit-scrollbar-thumb {
    background: #c8ccd0;
    border-radius: 999px;
}

.forum-create-thumb {
    position: relative;
    flex: 0 0 auto;
    width: 7.5rem;
    height: 7.5rem;
    scroll-snap-align: start;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #edeff1;
    background: #f6f7f8;
}

.forum-create-thumb--error {
    border-color: #fca5a5;
}

.forum-create-thumb--draggable {
    cursor: grab;
    touch-action: none;
}

.forum-create-thumb--draggable:active {
    cursor: grabbing;
}

.forum-create-thumb--dragging {
    opacity: 0.45;
    transform: scale(0.96);
}

.forum-create-thumb--drag-over {
    box-shadow: 0 0 0 2px #0079d3;
}

.forum-create-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}

.forum-create-thumb-loading,
.forum-create-thumb-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    height: 100%;
    font-size: 0.72rem;
    color: #787c7e;
}

.forum-create-spinner {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #edeff1;
    border-top-color: #ff4500;
    border-radius: 50%;
    animation: forum-create-spin 0.7s linear infinite;
}

@keyframes forum-create-spin {
    to { transform: rotate(360deg); }
}

.forum-create-thumb-remove {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 1.5rem;
    height: 1.5rem;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.forum-create-thumb-remove:hover {
    background: rgba(0, 0, 0, 0.85);
}

.forum-create-thumb-error-text {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 0.2rem 0.35rem;
    font-size: 0.65rem;
    color: #fff;
    background: rgba(185, 28, 28, 0.85);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-find-friends-subtitle {
    margin: 0.2rem 0 0;
    font-size: 0.85rem;
    color: #787c7e;
}

.forum-find-friends-search {
    margin-bottom: 0.75rem;
}

.forum-find-friends-count {
    margin: 0 0 0.65rem;
    font-size: 0.8rem;
    color: #878a8c;
}

.forum-find-friends-page .forum-student-card-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}


@media (max-width: 600px) {
    .forum-create-thumb {
        width: 6.75rem;
        height: 6.75rem;
    }
}

/* ==========================================================================
   Reddit-style user profile
   ========================================================================== */

.reddit-profile-page {
    max-width: 740px;
    margin: 0 auto;
    padding: 0.75rem 1rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.reddit-profile-page--wide {
    max-width: 1100px;
    width: 100%;
    padding: 0.35rem 1.25rem 1.5rem;
    box-sizing: border-box;
}

/* Student account profile — polished layout */
.reddit-profile-page--student {
    gap: 1rem;
}

.reddit-profile-page--student .reddit-profile-card--header {
    border-radius: 4px;
    box-shadow: none;
    border-color: #e5e7eb;
    overflow: visible;
}

.reddit-profile-page--student .reddit-profile-banner {
    height: 3px;
    background: #111827;
}

.reddit-profile-page--student .reddit-profile-body {
    padding: 1rem 1.25rem 1.25rem;
}

.reddit-profile-page--student .reddit-profile-identity-row {
    display: flex;
    align-items: flex-start;
    gap: 1.15rem;
}

.reddit-profile-page--student .reddit-profile-avatar-wrap {
    margin: 0;
    flex-shrink: 0;
}

.reddit-profile-page--student .reddit-profile-avatar-wrap--rect .forum-avatar--lg {
    width: 5.25rem;
    height: 6.5rem;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    box-shadow: none;
}

.reddit-profile-page--student .reddit-profile-avatar-wrap--rect .forum-avatar-img {
    object-fit: cover;
}

.reddit-profile-page--student .reddit-profile-headline {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
    align-items: flex-start;
}

.reddit-profile-page--student .reddit-profile-menu-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    backdrop-filter: none;
}

.reddit-profile-page--student .reddit-profile-menu-btn:hover {
    background: #f9fafb;
}

.reddit-profile-page--student .reddit-profile-menu {
    top: 0.75rem;
    right: 0.75rem;
}

.reddit-profile-page--student .reddit-profile-more-menu {
    border-radius: 4px;
}

.reddit-profile-page--student .reddit-profile-bio {
    margin: 0.5rem 0 0;
    font-size: 0.88rem;
    color: #4b5563;
}

.reddit-profile-bio--empty {
    color: #9ca3af;
    font-size: 0.85rem;
}

.reddit-profile-bio--empty a {
    color: #0079d3;
    font-weight: 600;
    text-decoration: none;
}

.reddit-profile-bio--empty a:hover {
    text-decoration: underline;
}

.reddit-profile-stats--ig {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 2rem 2.75rem;
    padding-top: 1rem;
    margin-top: 0.75rem;
    border-top: 1px solid #edeff1;
}

.reddit-profile-stats--ig.reddit-profile-stats--headline {
    gap: 1.25rem 1.75rem;
    padding-top: 0.35rem;
    margin-top: 0.15rem;
    margin-bottom: 0;
    border-top: none;
}

.reddit-profile-stats--headline .reddit-profile-stat-ig {
    align-items: flex-start;
}

.reddit-profile-page--student .reddit-profile-stats--headline + .reddit-profile-bio,
.reddit-profile-page--student .reddit-profile-stats--headline + .reddit-profile-bio--empty {
    margin-top: 0.65rem;
}

.reddit-profile-stat-ig {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    min-width: 3.5rem;
    padding: 0;
    border: none;
    background: transparent;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    text-align: center;
}

.reddit-profile-stat-ig:hover {
    opacity: 0.85;
}

.reddit-profile-stat-ig-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: #262626;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.reddit-profile-stat-ig-label {
    font-size: 0.82rem;
    font-weight: 400;
    color: #737373;
    line-height: 1.2;
}

.reddit-profile-stat-ig--active .reddit-profile-stat-ig-value {
    color: #0079d3;
}

.reddit-profile-stat-ig--link:hover {
    text-decoration: none;
}

.reddit-profile-stat-ig--link:hover .reddit-profile-stat-ig-value {
    color: #0079d3;
}

.reddit-profile-stat-ig--display {
    cursor: default;
}

/* Instagram-style forum profile (shared by /profile and /forum/profile/{id}) */
.ig-profile-page {
    max-width: var(--forum-max, 470px);
    margin: 0 auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: calc(100dvh - var(--ew-topbar-height, 3.25rem) - var(--learner-bottom-nav-height) - env(safe-area-inset-bottom, 0px));
    padding: 0 0 var(--ig-profile-logout-bar-height);
    background: #fff;
}

.ig-profile-header {
    padding: 0.85rem 1rem 0.75rem;
}

.ig-profile-top {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.ig-profile-avatar {
    flex-shrink: 0;
}

.ig-profile-avatar .forum-avatar-img {
    object-fit: cover;
}

.ig-profile-stats {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: space-around;
    gap: 0.5rem;
    min-width: 0;
}

.ig-profile-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.ig-profile-stat--link:hover .ig-profile-stat-value {
    color: var(--ew-primary);
}

.ig-profile-stat-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: #262626;
    line-height: 1.1;
}

.ig-profile-stat-label {
    font-size: 0.75rem;
    color: #737373;
    line-height: 1.2;
}

.ig-profile-identity {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin-top: 0.85rem;
}

.ig-profile-name {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #262626;
    line-height: 1.2;
}

.ig-profile-badge {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--ew-primary);
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: #eff6ff;
}

.ig-profile-handle {
    flex: 0 0 100%;
    margin: 0;
    font-size: 0.78rem;
    color: #737373;
}

.ig-profile-bio {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
    line-height: 1.45;
    color: #262626;
    white-space: pre-wrap;
    word-break: break-word;
}

.ig-profile-bio--empty {
    color: #737373;
}

.ig-profile-bio--empty a {
    color: var(--ew-primary);
    font-weight: 600;
    text-decoration: none;
}

.ig-profile-bio--empty a:hover {
    text-decoration: underline;
}

.ig-profile-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.ig-profile-action-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #dbdbdb;
    background: #fafafa;
    color: #262626;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ig-profile-action-btn:hover:not(:disabled) {
    background: #f3f4f6;
    color: #262626;
}

.ig-profile-action-btn--follow {
    border-color: transparent;
    background: #0095f6;
    color: #fff;
}

.ig-profile-action-btn--follow:hover:not(:disabled) {
    background: #1877f2;
    color: #fff;
}

.ig-profile-action-btn--following {
    background: #efefef;
    color: #262626;
    border-color: #dbdbdb;
}

.ig-profile-action-btn--following:hover:not(:disabled) {
    background: #dbdbdb;
}

.ig-profile-action-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.ig-profile-tabs {
    display: flex;
    align-items: stretch;
    border-top: 1px solid #efefef;
    border-bottom: 1px solid #efefef;
}

.ig-profile-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.35rem;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    background: transparent;
    color: #a8a8a8;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.ig-profile-tab:hover {
    color: #737373;
}

.ig-profile-tab--active {
    color: #262626;
    border-bottom-color: #262626;
}

.ig-profile-content {
    flex: 1;
    min-height: 8rem;
}

.ig-profile-content--grid {
    padding: 0;
}

.ig-profile-content--grid .forum-profile-grid {
    gap: 2px;
    background: #fff;
}

.ig-profile-content .forum-post-list {
    gap: 0;
}

.ig-profile-loading,
.ig-profile-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: #737373;
    font-size: 0.875rem;
}

.ig-profile-footer {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(var(--learner-bottom-nav-height) + env(safe-area-inset-bottom, 0px));
    z-index: 25;
    width: 100%;
    max-width: var(--forum-max, 470px);
    box-sizing: border-box;
    margin-top: 0;
    padding: 0.75rem 1rem;
    border-top: 1px solid #efefef;
    background: #fff;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
}

.ig-profile-logout-btn {
    display: block;
    width: 100%;
    padding: 0.95rem 1rem;
    border: 1.5px solid #f87171;
    border-radius: 0;
    background: #fff;
    color: #dc2626;
    font-size: 0.9375rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.08);
}

.ig-profile-logout-btn:hover {
    background: #fef2f2;
    border-color: #ef4444;
}

@media (min-width: 901px) {
    .ig-profile-page {
        border-left: 1px solid #efefef;
        border-right: 1px solid #efefef;
    }
}

.reddit-profile-content--grid {
    padding: 0;
    background: #fff;
}

.forum-profile-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
    background: #dbdbdb;
}

.forum-profile-grid-cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    overflow: hidden;
    background: #fafafa;
    text-decoration: none;
    color: #262626;
}

.forum-profile-grid-cell:hover {
    opacity: 0.92;
}

.forum-profile-grid-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.forum-profile-grid-text {
    padding: 0.5rem;
    font-size: 0.72rem;
    line-height: 1.35;
    text-align: center;
    word-break: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
}

.forum-profile-grid-badge {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    font-size: 0.85rem;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    line-height: 1;
}

.forum-profile-grid-cell--create {
    flex-direction: column;
    gap: 0.35rem;
    background: #fafafa;
    border: 2px dashed #dbdbdb;
    color: #8e8e8e;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.forum-profile-grid-cell--create:hover {
    opacity: 1;
    background: #f3f4f6;
    border-color: #a8a8a8;
    color: #262626;
}

.forum-profile-create-icon {
    font-size: 2rem;
    font-weight: 300;
    line-height: 1;
}

.forum-profile-create-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.forum-profile-grid-cell--comment {
    flex-direction: column;
    gap: 0.25rem;
    background: linear-gradient(145deg, #f8fafc 0%, #eef2ff 100%);
}

.forum-profile-grid-comment-icon {
    font-size: 1.1rem;
    line-height: 1;
    opacity: 0.7;
}

.reddit-profile-feed-card {
    background: #fff;
    border: 1px solid #edeff1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.reddit-profile-page--student .reddit-profile-feed-card {
    border-radius: 4px;
    box-shadow: none;
    border-color: #e5e7eb;
}

.reddit-profile-page--student .reddit-profile-tabs {
    border: none;
    border-top: 1px solid #dbdbdb;
    border-bottom: none;
    border-radius: 0;
    background: #fff;
    padding: 0;
    justify-content: center;
    gap: 0;
}

.reddit-profile-page--student .reddit-profile-tab {
    flex: 1;
    padding: 0.75rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8e8e8e;
    border-bottom: none;
    border-top: 2px solid transparent;
    margin-bottom: 0;
    margin-top: -1px;
}

.reddit-profile-page--student .reddit-profile-tab--active {
    background: #fff;
    border-top-color: #262626;
    border-bottom-color: transparent;
    color: #262626;
}

.reddit-profile-page--student .reddit-profile-content {
    padding: 0.85rem;
    background: #fff;
}

.reddit-profile-page--student .reddit-profile-content.reddit-profile-content--grid {
    padding: 0;
}

.reddit-profile-page--student .reddit-profile-content .forum-post-list {
    gap: 0;
}

.reddit-profile-page--student .reddit-profile-loading,
.reddit-profile-page--student .reddit-profile-empty {
    border: none;
    border-radius: 8px;
    background: #f9fafb;
    padding: 2.5rem 1rem;
}

.reddit-profile-page--student .reddit-profile-comment-list {
    gap: 0.65rem;
}

.reddit-profile-page--student .reddit-profile-comment {
    border-radius: 10px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.reddit-profile-page--student .reddit-profile-comment:hover {
    box-shadow: 0 2px 8px rgba(0, 121, 211, 0.08);
}

.reddit-profile-page--student .reddit-profile-about-card {
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.reddit-profile-points-card {
    background: linear-gradient(135deg, #eff6ff 0%, #fff 70%);
    border-color: #bfdbfe;
}

.reddit-profile-points-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.reddit-profile-points-card-head .reddit-profile-about-title {
    margin-bottom: 0;
}

.reddit-profile-points-link {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ew-primary, #1d4ed8);
    text-decoration: none;
    white-space: nowrap;
}

.reddit-profile-points-link:hover {
    text-decoration: underline;
}

.reddit-profile-points--hero {
    margin-bottom: 0;
}

.reddit-profile-points--hero .reddit-profile-points-value {
    font-size: 2rem;
}

.reddit-profile-loading-inline {
    margin: 0;
    font-size: 0.82rem;
    color: #9ca3af;
}

.reddit-profile-quicklinks--rows {
    gap: 0;
}

.reddit-profile-quicklink-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0;
    border-top: 1px solid #f3f4f6;
    color: #1a1a1b;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
}

.reddit-profile-quicklinks--rows .reddit-profile-quicklink-row:first-child {
    border-top: none;
    padding-top: 0;
}

.reddit-profile-quicklink-row:hover {
    color: #0079d3;
}

.reddit-profile-quicklink-row span:last-child {
    color: #9ca3af;
    font-size: 1rem;
}

.reddit-profile-back {
    margin-bottom: 0.25rem;
}

.reddit-profile-nav {
    margin-bottom: 0.35rem;
}

.reddit-profile-nav-back {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: #7c7c7c;
    text-decoration: none;
    line-height: 1.2;
}

.reddit-profile-nav-back:hover {
    color: #0079d3;
}

.reddit-profile-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 1.25rem;
    align-items: start;
}

.reddit-profile-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.reddit-profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: sticky;
    top: 1rem;
}

.reddit-profile-card {
    background: #fff;
    border: 1px solid #edeff1;
    border-radius: 8px;
    overflow: hidden;
}

.reddit-profile-card--header {
    grid-column: 1 / -1;
    position: relative;
}

.reddit-profile-banner-wrap {
    position: relative;
}

.reddit-profile-banner {
    height: 72px;
    background: linear-gradient(90deg, #0079d3 0%, #24a0ed 50%, #0079d3 100%);
}

.reddit-profile-menu {
    position: absolute;
    top: 0.65rem;
    right: 0.75rem;
    z-index: 2;
}

.reddit-profile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.05em;
    cursor: pointer;
    backdrop-filter: blur(4px);
}

.reddit-profile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.reddit-profile-more-menu {
    top: calc(100% + 0.35rem);
    right: 0;
    z-index: 10;
}

.reddit-profile-body {
    padding: 0 1.25rem 1.25rem;
}

.reddit-profile-avatar-wrap {
    margin-top: -2.25rem;
    margin-bottom: 0.35rem;
}

.reddit-profile-avatar-wrap .forum-avatar--lg {
    border: 4px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.reddit-profile-headline {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
}

.reddit-profile-headline-main {
    min-width: 0;
    flex: 1;
}

.reddit-profile-top-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    flex-shrink: 0;
    padding-bottom: 0.15rem;
}

.reddit-profile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
}

.reddit-profile-btn--block {
    width: 100%;
}

.reddit-profile-btn--outline {
    background: #fff;
    border-color: #0079d3;
    color: #0079d3;
}

.reddit-profile-btn--outline:hover {
    background: #f6f7f8;
}

.reddit-profile-btn--ghost {
    background: #f6f7f8;
    border-color: #edeff1;
    color: #1a1a1b;
}

.reddit-profile-btn--ghost:hover {
    background: #edeff1;
}

.reddit-profile-btn--primary {
    background: #0079d3;
    border-color: #0079d3;
    color: #fff;
}

.reddit-profile-btn--primary:hover {
    background: #006cbd;
}

.reddit-profile-btn--following {
    background: #fff;
    border-color: #edeff1;
    color: #1a1a1b;
}

.reddit-profile-btn--following:hover:not(:disabled) {
    background: #f6f7f8;
    border-color: #d7dadc;
}

.reddit-profile-follow-row {
    margin-top: 0.85rem;
}

.reddit-profile-username {
    margin: 0 0 0.25rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a1a1b;
    letter-spacing: -0.02em;
}

.reddit-profile-badge {
    display: inline-block;
    margin-bottom: 0.35rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #c2410c;
    font-size: 0.72rem;
    font-weight: 700;
}

.reddit-profile-bio {
    margin: 0.35rem 0 0.85rem;
    font-size: 0.9rem;
    color: #1a1a1b;
    line-height: 1.5;
    max-width: 52rem;
}

.reddit-profile-sidebar-bio {
    margin: 0;
    font-size: 0.85rem;
    color: #1a1a1b;
    line-height: 1.45;
}

.reddit-profile-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem 2rem;
    padding-top: 0.75rem;
    border-top: 1px solid #edeff1;
}

.reddit-profile-stat {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: 0.78rem;
    color: #7c7c7c;
    text-decoration: none;
}

.reddit-profile-stat strong {
    font-size: 1rem;
    color: #1a1a1b;
    font-weight: 700;
}

.reddit-profile-stat--link:hover strong {
    color: #0079d3;
}

.reddit-profile-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #edeff1;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border: 1px solid #edeff1;
    border-bottom: 2px solid #edeff1;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
}

.reddit-profile-tab {
    flex-shrink: 0;
    padding: 0.75rem 1.25rem;
    border: none;
    background: transparent;
    font-size: 0.88rem;
    font-weight: 700;
    color: #7c7c7c;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.reddit-profile-tab:hover {
    color: #1a1a1b;
}

.reddit-profile-tab--active {
    color: #0079d3;
    border-bottom-color: #0079d3;
}

.reddit-profile-content {
    min-height: 120px;
    background: transparent;
}

.reddit-profile-content .forum-post-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.reddit-profile-content .forum-profile-grid {
    border-radius: 12px;
    overflow: hidden;
    gap: 3px;
    background: #e2e8f0;
    border: 1px solid #e2e8f0;
}

.reddit-profile-content .forum-profile-grid-cell {
    border-radius: 0;
}

.reddit-profile-content .forum-profile-grid-text {
    font-size: 0.78rem;
    line-height: 1.4;
    color: #334155;
}

.reddit-profile-loading,
.reddit-profile-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: #7c7c7c;
    font-size: 0.9rem;
    background: #fff;
    border: 1px solid #edeff1;
    border-radius: 0 0 8px 8px;
}

.reddit-profile-comment-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.reddit-profile-comment {
    display: block;
    padding: 0.85rem 1rem;
    background: #fff;
    border: 1px solid #edeff1;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
}

.reddit-profile-comment:hover {
    border-color: #0079d3;
}

.reddit-profile-comment-text {
    margin: 0 0 0.35rem;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #1a1a1b;
}

.reddit-profile-comment-meta {
    font-size: 0.75rem;
    color: #7c7c7c;
}

.reddit-profile-about {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.reddit-profile-about--full {
    padding-top: 0.75rem;
}

.reddit-profile-about-card {
    background: #fff;
    border: 1px solid #edeff1;
    border-radius: 8px;
    padding: 1rem 1.15rem;
}

.reddit-profile-about-title {
    margin: 0 0 0.75rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #7c7c7c;
}

.reddit-profile-about-list {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.reddit-profile-about-list--compact {
    gap: 0.5rem;
}

.reddit-profile-about-row {
    display: grid;
    grid-template-columns: 7rem 1fr;
    gap: 0.75rem;
    font-size: 0.88rem;
}

.reddit-profile-about-list--compact .reddit-profile-about-row {
    grid-template-columns: 5rem 1fr;
    font-size: 0.82rem;
}

.reddit-profile-about-row dt {
    margin: 0;
    color: #7c7c7c;
    font-weight: 600;
}

.reddit-profile-about-row dd {
    margin: 0;
    color: #1a1a1b;
    word-break: break-word;
}

/* Profile About tab — tile grid */
.profile-about-panel {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.profile-about-panel__card {
    margin: 0;
}

.profile-about-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.profile-about-tile {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 0.9rem;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e8edf2;
    border-radius: 10px;
    min-height: 4.25rem;
}

.profile-about-tile__icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0079d3;
}

.profile-about-tile__icon svg {
    width: 1.1rem;
    height: 1.1rem;
}

.profile-about-tile__icon--sm {
    width: 1.85rem;
    height: 1.85rem;
}

.profile-about-tile__icon--sm svg {
    width: 0.95rem;
    height: 0.95rem;
}

.profile-about-tile__body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.profile-about-tile__label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
}

.profile-about-tile__value {
    font-size: 0.92rem;
    font-weight: 600;
    color: #1a1a1b;
    line-height: 1.35;
    word-break: break-word;
}

.profile-about-bio {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: #334155;
    white-space: pre-wrap;
}

.profile-about-contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.profile-about-contact-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-top: 1px solid #f1f5f9;
}

.profile-about-contact-row:first-child {
    border-top: none;
    padding-top: 0;
}

.profile-about-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
}

.profile-about-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.85rem 0.35rem;
    background: #f8fafc;
    border: 1px solid #e8edf2;
    border-radius: 10px;
    text-align: center;
}

.profile-about-stat__value {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0079d3;
    line-height: 1.1;
}

.profile-about-stat__label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #94a3b8;
}

@media (max-width: 640px) {
    .profile-about-grid {
        grid-template-columns: 1fr;
    }

    .profile-about-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.reddit-profile-points {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.reddit-profile-points-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0079d3;
}

.reddit-profile-points-label {
    font-size: 0.9rem;
    color: #7c7c7c;
}

.reddit-profile-points-log {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.82rem;
}

.reddit-profile-points-log li {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: baseline;
    padding: 0.5rem 0;
    border-top: 1px solid #edeff1;
}

.reddit-profile-quicklinks {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.reddit-profile-quicklink {
    display: block;
    padding: 0.45rem 0;
    color: #0079d3;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}

.reddit-profile-quicklink:hover {
    text-decoration: underline;
}

.reddit-profile-sidebar-follow {
    padding: 0.85rem 1rem;
}

.reddit-profile-logout {
    margin-top: 0.5rem;
    padding: 0.75rem;
    border: 1px solid #edeff1;
    border-radius: 8px;
    background: #fff;
    color: #ff4500;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}

.reddit-profile-logout:hover {
    background: #fff5f0;
    border-color: #ff4500;
}

.reddit-profile-logout--desktop {
    display: block;
}

.reddit-profile-logout--mobile {
    display: none;
}

/* Desktop enhancements */
@media (min-width: 901px) {
    .reddit-profile-banner {
        height: 3px;
    }

    .reddit-profile-avatar-wrap {
        margin-top: 0;
    }

    .reddit-profile-avatar-wrap .forum-avatar--lg {
        width: 5.5rem;
        height: 5.5rem;
        font-size: 1.25rem;
    }

    .reddit-profile-page--student .reddit-profile-avatar-wrap--rect .forum-avatar--lg {
        width: 5.25rem;
        height: 6.5rem;
    }

    .reddit-profile-username {
        font-size: 1.6rem;
    }

    .reddit-profile-stats {
        gap: 2rem 3rem;
    }

    .reddit-profile-stat-ig-value {
        font-size: 1.5rem;
    }

    .reddit-profile-stat-ig-label {
        font-size: 0.85rem;
    }

    .reddit-profile-stat strong {
        font-size: 1.15rem;
    }

    .reddit-profile-card--header .reddit-profile-body {
        padding: 0 1.75rem 1.5rem;
    }

    .reddit-profile-content .forum-card-media {
        max-height: 480px;
    }
}

/* Tablet / mobile */
@media (max-width: 900px) {
    .reddit-profile-page--wide {
        padding: 0.5rem 0.75rem 1.5rem;
    }

    .reddit-profile-shell {
        grid-template-columns: 1fr;
    }

    .reddit-profile-sidebar {
        display: none;
    }

    .reddit-profile-logout--desktop {
        display: none;
    }

    .reddit-profile-logout--mobile {
        display: block;
        margin-top: 1rem;
    }
}

@media (max-width: 600px) {
    .reddit-profile-page {
        padding: 0.5rem 0.65rem 1.5rem;
    }

    .reddit-profile-body {
        padding: 0 0.85rem 1rem;
    }

    .reddit-profile-page--student .reddit-profile-body {
        padding: 0.85rem 1rem 1rem;
    }

    .reddit-profile-page--student .reddit-profile-identity-row {
        gap: 0.85rem;
    }

    .reddit-profile-page--student .reddit-profile-avatar-wrap--rect .forum-avatar--lg {
        width: 4.5rem;
        height: 5.5rem;
    }

    .reddit-profile-headline {
        flex-direction: column;
        align-items: stretch;
    }

    .reddit-profile-top-actions {
        width: 100%;
        justify-content: stretch;
        padding-bottom: 0;
    }

    .reddit-profile-btn {
        flex: 1;
        min-width: 0;
        padding: 0.45rem 0.65rem;
        font-size: 0.78rem;
    }

    .reddit-profile-stats {
        gap: 1rem 1.5rem;
    }

    .reddit-profile-about-row {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }

    .reddit-profile-tab {
        padding: 0.65rem 0.85rem;
        font-size: 0.82rem;
    }

    .reddit-profile-username {
        font-size: 1.15rem;
    }

    .reddit-profile-content .forum-card-media {
        max-height: 240px;
    }

    .reddit-profile-content .forum-card-header-top {
        flex-wrap: wrap;
    }

    .reddit-profile-stats--ig {
        justify-content: space-between;
        gap: 0.5rem;
    }

    .reddit-profile-stat-ig {
        flex: 1;
        min-width: 0;
    }

    .reddit-profile-stat-ig-value {
        font-size: 1.2rem;
    }

    .reddit-profile-stat-ig-label {
        font-size: 0.78rem;
    }

    .reddit-profile-page--student .reddit-profile-top-actions .reddit-profile-btn {
        width: 100%;
        justify-content: center;
    }

    .reddit-profile-page--student .reddit-profile-content {
        padding: 0.65rem;
    }
}

/* ==========================================================================
   Instagram-style followers / following
   ========================================================================== */

.ig-follow-page {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #dbdbdb;
    border-radius: 12px;
    overflow: hidden;
    min-height: 420px;
}

.ig-follow-header {
    display: grid;
    grid-template-columns: 2.5rem 1fr 2.5rem;
    align-items: center;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #dbdbdb;
}

.ig-follow-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    font-size: 1.5rem;
    line-height: 1;
    color: #262626;
    text-decoration: none;
}

.ig-follow-back:hover {
    color: #0095f6;
}

.ig-follow-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    color: #262626;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ig-follow-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid #dbdbdb;
}

.ig-follow-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 0.5rem;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    color: #8e8e8e;
    text-decoration: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    background: transparent;
    cursor: pointer;
}

.ig-follow-tab:hover {
    color: #262626;
}

.ig-follow-tab--active {
    color: #262626;
    border-bottom-color: #262626;
}

.ig-follow-search-wrap {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid #efefef;
}

.ig-follow-search {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 8px;
    background: #efefef;
    font-size: 0.88rem;
    color: #262626;
    box-sizing: border-box;
}

.ig-follow-search:focus {
    outline: none;
    background: #e8e8e8;
}

.ig-follow-search::placeholder {
    color: #8e8e8e;
}

.ig-follow-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: min(60vh, 520px);
    overflow-y: auto;
}

.ig-follow-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
}

.ig-follow-row + .ig-follow-row {
    border-top: 1px solid #fafafa;
}

.ig-follow-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

.ig-follow-user:hover .ig-follow-username {
    color: #0095f6;
}

.ig-follow-user-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.ig-follow-username {
    font-size: 0.88rem;
    font-weight: 600;
    color: #262626;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ig-follow-subtitle {
    font-size: 0.78rem;
    color: #8e8e8e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ig-follow-btn {
    flex-shrink: 0;
    min-width: 5.5rem;
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    border: none;
    background: #0095f6;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}

.ig-follow-btn:hover:not(:disabled) {
    background: #1877f2;
}

.ig-follow-btn--following {
    background: #efefef;
    color: #262626;
    border: 1px solid #dbdbdb;
}

.ig-follow-btn--following:hover:not(:disabled) {
    background: #dbdbdb;
}

.ig-follow-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.ig-follow-empty,
.ig-follow-loading {
    padding: 3rem 1.5rem;
    text-align: center;
    color: #8e8e8e;
    font-size: 0.9rem;
}

@media (max-width: 640px) {
    .ig-follow-page {
        max-width: none;
        margin: -1rem -1.15rem 0;
        border: none;
        border-radius: 0;
        min-height: calc(100dvh - var(--ew-topbar-height, 56px) - 2rem);
    }

    .forum-student-search-page .forum-student-search-page-card {
        margin: 0;
        border: 1px solid #dbdbdb;
        border-radius: 12px;
    }

    .forum-student-search-page {
        padding: 0 0.85rem 1rem;
    }

    .ig-follow-list {
        max-height: none;
    }
}

@media (min-width: 641px) {
    .ig-follow-page {
        margin-top: 0.5rem;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    }
}

/* ==========================================================================
   Edit forum profile
   ========================================================================== */

.reddit-profile-edit-page {
    max-width: 640px;
    margin: 0 auto;
    padding: 0.35rem 1rem 1.5rem;
}

.reddit-profile-edit-loading {
    padding: 3rem 1rem;
    text-align: center;
    color: #7c7c7c;
}

.reddit-profile-edit-card {
    background: #fff;
    border: 1px solid #edeff1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.reddit-profile-edit-banner {
    height: 96px;
    background: linear-gradient(90deg, #0079d3 0%, #24a0ed 50%, #0079d3 100%);
}

.reddit-profile-edit-body {
    padding: 0 1.5rem 1.5rem;
}

.reddit-profile-edit-photo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    margin-top: -2.75rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

.reddit-profile-edit-photo .forum-avatar--lg {
    border: 4px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.reddit-profile-edit-photo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    border: 1px solid #0079d3;
    background: #fff;
    color: #0079d3;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.reddit-profile-edit-photo-btn:hover {
    background: #f6f7f8;
}

.reddit-profile-edit-file {
    display: none;
}

.reddit-profile-edit-photo-hint {
    margin: 0;
    font-size: 0.72rem;
    color: #7c7c7c;
}

.reddit-profile-edit-section {
    margin-bottom: 1rem;
}

.reddit-profile-edit-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #7c7c7c;
}

.reddit-profile-edit-bio {
    width: 100%;
    padding: 0.75rem 0.85rem;
    border: 1px solid #edeff1;
    border-radius: 8px;
    font: inherit;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 7rem;
    box-sizing: border-box;
}

.reddit-profile-edit-bio:focus {
    outline: none;
    border-color: #0079d3;
    box-shadow: 0 0 0 2px rgba(0, 121, 211, 0.15);
}

.reddit-profile-edit-count {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.72rem;
    color: #7c7c7c;
    text-align: right;
}

.reddit-profile-edit-error {
    margin: 0 0 1rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 0.85rem;
}

.reddit-profile-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
    padding-top: 0.5rem;
    border-top: 1px solid #edeff1;
}

@media (min-width: 901px) {
    .reddit-profile-edit-banner {
        height: 112px;
    }

    .reddit-profile-edit-photo {
        margin-top: -3.25rem;
    }

    .reddit-profile-edit-photo .forum-avatar--lg {
        width: 5.5rem;
        height: 5.5rem;
        font-size: 1.25rem;
    }

    .reddit-profile-edit-body {
        padding: 0 2rem 2rem;
    }
}

@media (max-width: 600px) {
    .reddit-profile-edit-page {
        padding: 0.5rem 0.65rem 1.5rem;
    }

    .reddit-profile-edit-body {
        padding: 0 1rem 1.25rem;
    }

    .reddit-profile-edit-actions {
        flex-direction: column-reverse;
    }

    .reddit-profile-edit-actions .reddit-profile-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ── Forum post detail (shared styles) ── */
.forum-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0;
    border: none;
    background: transparent;
    color: #334155;
    font: inherit;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
}

.forum-like-btn:hover {
    color: #e11d48;
}

.forum-like-btn--active {
    color: #e11d48;
}

.forum-like-btn--sm {
    font-size: 0.95rem;
}

.forum-like-icon {
    display: inline-block;
    line-height: 1;
}

.forum-like-count {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
}

.forum-like-btn--active .forum-like-count {
    color: #e11d48;
}

.forum-card-action--comment {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0;
    border: none;
    background: transparent;
    color: #334155;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.forum-card-action--comment:hover {
    color: var(--ew-primary);
}

.forum-card-caption {
    padding: 0 0.75rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--ew-text);
}

.forum-card-caption-author {
    font-weight: 700;
    color: var(--ew-text);
    text-decoration: none;
    margin-right: 0.35rem;
}

.forum-card-caption-author:hover {
    text-decoration: underline;
}

.forum-card-caption-text {
    color: var(--ew-text);
    word-break: break-word;
}

.forum-detail-page--ig {
    max-width: 470px;
    margin: 0 auto;
    padding: 0 0 1.5rem;
}

.forum-detail-header--ig {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--ew-border);
    background: var(--ew-surface-raised);
    position: sticky;
    top: 0;
    z-index: 10;
}

.forum-detail-header-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.forum-detail-header--ig .forum-card-author {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--ew-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-detail-header--ig .forum-detail-more {
    margin-left: auto;
}

.forum-detail-actions--ig {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.4rem 0.75rem 0.25rem;
}

.forum-detail-comments-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0;
    border: none;
    background: transparent;
    color: #334155;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}

.forum-detail-comments-toggle:hover,
.forum-detail-comments-toggle--active {
    color: var(--ew-primary);
}

.forum-detail-comments-count {
    font-size: 0.8125rem;
    font-weight: 600;
}

.forum-detail-caption {
    padding: 0 0.75rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.4;
}

.forum-view-comments-btn {
    display: block;
    margin-top: 0.35rem;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--ew-text-muted);
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
}

.forum-view-comments-btn:hover {
    color: var(--ew-text);
}

.forum-detail-caption-text {
    display: block;
    margin-top: 0.15rem;
    color: var(--ew-text);
    word-break: break-word;
    white-space: pre-wrap;
}

.forum-detail-caption-time {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ew-text-muted);
}

.forum-replies-section--ig {
    border-top: 1px solid var(--ew-border);
    padding: 0.45rem 0.75rem 0.55rem;
    background: var(--ew-surface-raised);
}

.forum-replies-section--ig .forum-reply-form {
    margin-bottom: 0.25rem;
}

.forum-replies-section--ig .forum-comment-composer-wrap {
    margin-bottom: 0;
}

.forum-replies-section--ig .forum-comment-composer {
    min-height: 2rem;
    max-height: 5rem;
    padding: 0.4rem 2.15rem 0.4rem 0.55rem;
    font-size: 0.8125rem;
}

.forum-replies-section--ig .forum-comment-send {
    width: 1.65rem;
    height: 1.65rem;
    right: 0.25rem;
    bottom: 0.25rem;
}

.forum-replies-section--ig .forum-comment-send-icon {
    width: 0.9rem;
    height: 0.9rem;
}

.forum-replies-section--ig .forum-comment {
    gap: 0.4rem;
    padding: 0.35rem 0;
    border-bottom: none;
}

.forum-replies-section--ig .forum-comment-header {
    margin-bottom: 0.1rem;
    font-size: 0.72rem;
}

.forum-replies-section--ig .forum-comment-text {
    margin: 0 0 0.15rem;
    font-size: 0.8125rem;
    line-height: 1.35;
}

.forum-replies-section--ig .forum-comment-actions {
    gap: 0.4rem;
}

.forum-replies-section--ig .forum-comment-reply-btn {
    font-size: 0.6875rem;
}

.forum-replies-section--ig .forum-comment--depth-2 {
    margin-left: 1.35rem;
}

.forum-replies-section--ig .forum-comment--depth-3 {
    margin-left: 2.5rem;
}

.forum-replies-section--ig .forum-comment-reply-form {
    margin-top: 0.3rem;
}

.forum-replies-section--ig .forum-comment-replying-to {
    margin-bottom: 0.25rem;
    font-size: 0.6875rem;
}

.forum-replies-section--ig .forum-comment-composer-error {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
}

@media (min-width: 768px) {
    .forum-detail-page--ig {
        padding-top: 0.5rem;
    }
}

/* Learner cosmetic frames/flair (see engagement.css for full shop UI) */
.cosmetic-name-flair {
    margin-left: 0.25rem;
    font-size: 0.85em;
    line-height: 1;
    vertical-align: middle;
}
