:root {
    /* Premium SaaS palette - Indigo/Royal Blue/Cyan primary, Violet/Gold secondary accents */
    --fpb-indigo: #4f46e5;
    --fpb-royal-blue: #2563eb;
    --fpb-cyan: #06b6d4;
    --fpb-emerald: #10b981;
    --fpb-violet: #8b5cf6;
    --fpb-gold: #f59e0b;

    --fpb-success: #16a34a;
    --fpb-warning: #f59e0b;
    --fpb-danger: #dc2626;
    --fpb-info: #3b82f6;

    --fpb-bg-light: #eef1f8;
    --fpb-bg-dark: #0a0c17;
    --fpb-glass-light: rgba(255, 255, 255, 0.6);
    --fpb-glass-dark: rgba(20, 22, 38, 0.55);
    --fpb-border-light: rgba(255, 255, 255, 0.45);
    --fpb-border-dark: rgba(255, 255, 255, 0.09);
    --fpb-text-light: #171933;
    --fpb-text-dark: #eef1fa;

    /* Kept for backward compatibility with existing markup referencing these names */
    --fpb-accent-1: var(--fpb-indigo);
    --fpb-accent-2: var(--fpb-royal-blue);
    --fpb-accent-3: var(--fpb-cyan);

    --fpb-shadow-light: 0 8px 32px rgba(79, 70, 229, 0.12);
    --fpb-shadow-dark: 0 8px 40px rgba(0, 0, 0, 0.55);

    --fpb-font-display: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --fpb-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --fpb-font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
}

body {
    font-family: var(--fpb-font-body);
    background: var(--fpb-bg-light);
    color: var(--fpb-text-light);
    min-height: 100vh;
    transition: background .3s ease, color .3s ease;
}

body.dark-mode {
    background: var(--fpb-bg-dark);
    color: var(--fpb-text-dark);
}

h1, h2, h3, h4, h5, h6, .fpb-display {
    font-family: var(--fpb-font-display);
    letter-spacing: -0.01em;
}

code, .fpb-mono {
    font-family: var(--fpb-font-mono);
}

/* Signature element: a slow-drifting aurora of the brand palette behind glass surfaces,
   built from several independently-animated radial blobs rather than one static gradient. */
.fpb-animated-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background: var(--fpb-bg-light);
}

body.dark-mode .fpb-animated-bg {
    background: var(--fpb-bg-dark);
}

.fpb-animated-bg::before,
.fpb-animated-bg::after,
.fpb-animated-bg .fpb-aurora-blob {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .55;
}

.fpb-animated-bg::before {
    width: 46vw;
    height: 46vw;
    top: -10%;
    left: -8%;
    background: radial-gradient(circle, var(--fpb-indigo), transparent 70%);
    animation: fpbDrift1 22s ease-in-out infinite;
}

.fpb-animated-bg::after {
    width: 40vw;
    height: 40vw;
    bottom: -12%;
    right: -6%;
    background: radial-gradient(circle, var(--fpb-cyan), transparent 70%);
    animation: fpbDrift2 26s ease-in-out infinite;
}

.fpb-animated-bg .fpb-aurora-blob {
    width: 34vw;
    height: 34vw;
    top: 30%;
    left: 55%;
    background: radial-gradient(circle, var(--fpb-violet), transparent 70%);
    animation: fpbDrift3 30s ease-in-out infinite;
}

body.dark-mode .fpb-animated-bg::before,
body.dark-mode .fpb-animated-bg::after,
body.dark-mode .fpb-animated-bg .fpb-aurora-blob {
    opacity: .35;
}

@keyframes fpbDrift1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(6vw, 8vh) scale(1.12); }
}
@keyframes fpbDrift2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(-7vw, -6vh) scale(1.08); }
}
@keyframes fpbDrift3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(-5vw, 7vh) scale(0.94); }
}

@media (prefers-reduced-motion: reduce) {
    .fpb-animated-bg::before,
    .fpb-animated-bg::after,
    .fpb-animated-bg .fpb-aurora-blob {
        animation: none;
    }
}

.fpb-glass-card {
    background: var(--fpb-glass-light);
    border: 1px solid var(--fpb-border-light);
    border-radius: 20px;
    box-shadow: var(--fpb-shadow-light);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    transition: transform .25s ease, box-shadow .25s ease, background .3s ease;
}

body.dark-mode .fpb-glass-card {
    background: var(--fpb-glass-dark);
    border-color: var(--fpb-border-dark);
    box-shadow: var(--fpb-shadow-dark);
}

.fpb-glass-card:hover {
    transform: translateY(-3px);
}

.fpb-auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
}

.fpb-auth-card {
    width: 100%;
    max-width: 440px;
    padding: 44px 40px;
    position: relative;
    overflow: hidden;
}

.fpb-auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--fpb-indigo), var(--fpb-royal-blue), var(--fpb-cyan));
}

.fpb-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--fpb-font-display);
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 28px;
}

.fpb-brand .fpb-logo-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fpb-indigo), var(--fpb-cyan));
    box-shadow: 0 0 16px rgba(79, 70, 229, .7);
    flex-shrink: 0;
}

/* Auth-specific input styling: icon-prefixed, pill-rounded, focus glow */
.fpb-input-group {
    position: relative;
    margin-bottom: 18px;
}

.fpb-input-group .fpb-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    opacity: .55;
    pointer-events: none;
    font-size: .95rem;
}

.fpb-input-group .form-control {
    padding-left: 42px;
}

.fpb-input-group .fpb-toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    opacity: .55;
    cursor: pointer;
    padding: 4px;
}

.fpb-input-group .fpb-toggle-password:hover {
    opacity: .9;
}

.fpb-input-group label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    margin-bottom: 6px;
    opacity: .85;
}

.form-control,
.form-select {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 12px 16px;
}

body.dark-mode .form-control,
body.dark-mode .form-select {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--fpb-text-dark);
}

/* Fixes the dropdown popup (native <option> list) rendering with light-on-light /
   dark-on-dark text: color-scheme tells the browser to draw native form-control
   internals (the options popup) using a dark palette instead of the OS default. */
body.dark-mode select.form-select {
    color-scheme: dark;
}

body.dark-mode select.form-select option,
body.dark-mode select.form-select optgroup {
    background-color: #1b1e2b;
    color: var(--fpb-text-dark);
}

/* Light mode stays on the default (light) native popup explicitly, in case the OS
   itself is set to a dark theme - keeps our two modes independent of OS preference. */
body:not(.dark-mode) select.form-select {
    color-scheme: light;
}

.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .22);
    border-color: var(--fpb-indigo);
}

.btn-fpb-primary {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--fpb-indigo), var(--fpb-royal-blue) 55%, var(--fpb-cyan));
    background-size: 180% 180%;
    border: none;
    color: #fff;
    border-radius: 12px;
    padding: 12px 20px;
    font-weight: 600;
    font-family: var(--fpb-font-body);
    transition: transform .2s ease, box-shadow .2s ease, background-position .4s ease;
}

.btn-fpb-primary::before {
    content: '';
    position: absolute;
    top: 0; left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .35), transparent);
    transform: skewX(-20deg);
    transition: left .5s ease;
}

.btn-fpb-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(79, 70, 229, .35);
    background-position: 100% 50%;
    color: #fff;
}

.btn-fpb-primary:hover::before {
    left: 130%;
}

.btn-fpb-primary:active {
    transform: translateY(0);
}

.btn-fpb-primary:disabled,
.btn-fpb-primary.disabled {
    opacity: .6;
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

.fpb-theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* ============================================================
   App shell: sidebar + sticky topbar (admin & member panels)
   ============================================================ */
.fpb-app-shell {
    display: flex;
    align-items: flex-start;
    min-height: 100vh;
}

.fpb-sidebar {
    width: 260px;
    flex-shrink: 0;
    min-height: calc(100vh - 24px);
    padding: 24px 16px;
    margin: 12px;
    position: sticky;
    top: 12px;
    display: flex;
    flex-direction: column;
    transition: width .25s ease, padding .25s ease;
}

.fpb-sidebar .fpb-brand {
    margin-bottom: 24px;
}

.fpb-sidebar .nav-link {
    color: inherit;
    opacity: .75;
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background .2s ease, opacity .2s ease;
    white-space: nowrap;
    overflow: hidden;
}

.fpb-sidebar .nav-link.active,
.fpb-sidebar .nav-link:hover {
    opacity: 1;
    background: linear-gradient(135deg, rgba(79, 70, 229, .16), rgba(6, 182, 212, .12));
}

.fpb-sidebar .nav-link.active {
    box-shadow: inset 3px 0 0 var(--fpb-indigo);
}

.fpb-sidebar-collapse-btn {
    display: none;
    align-self: flex-end;
    background: none;
    border: none;
    opacity: .6;
    padding: 6px;
    margin-top: 12px;
}

@media (min-width: 993px) {
    .fpb-sidebar-collapse-btn { display: block; }
}

/* Collapsed desktop sidebar: icon-only rail */
body.fpb-sidebar-collapsed .fpb-sidebar {
    width: 76px;
}
body.fpb-sidebar-collapsed .fpb-sidebar .fpb-brand-text,
body.fpb-sidebar-collapsed .fpb-sidebar .nav-link span:not(.badge) {
    display: none;
}
body.fpb-sidebar-collapsed .fpb-sidebar .nav-link {
    justify-content: center;
}
body.fpb-sidebar-collapsed .fpb-sidebar-collapse-btn i {
    transform: rotate(180deg);
}

.fpb-main-col {
    flex: 1;
    min-width: 0;
}

.fpb-topbar {
    position: sticky;
    top: 12px;
    z-index: 20;
    margin: 12px 12px 0 0;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.fpb-main-content {
    padding: 20px 24px 32px;
}

.fpb-hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.3rem;
    opacity: .8;
}

.fpb-topbar-search {
    flex: 1;
    max-width: 420px;
    position: relative;
    display: flex;
    align-items: center;
}

.fpb-topbar-search i {
    position: absolute;
    left: 14px;
    opacity: .5;
    font-size: .9rem;
}

.fpb-topbar-search input {
    width: 100%;
    background: rgba(255, 255, 255, .5);
    border: 1px solid var(--fpb-border-light);
    border-radius: 999px;
    padding: 9px 14px 9px 38px;
    font-size: .88rem;
    color: inherit;
}

body.dark-mode .fpb-topbar-search input {
    background: rgba(255, 255, 255, .05);
    border-color: var(--fpb-border-dark);
}

.fpb-topbar-search input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .2);
}

.fpb-topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.fpb-theme-toggle-inline {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: .8;
    transition: background .2s ease;
}
.fpb-theme-toggle-inline:hover {
    background: rgba(0, 0, 0, .05);
}

.fpb-icon-btn {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: .8;
    transition: background .2s ease;
}
.fpb-icon-btn:hover {
    background: rgba(0, 0, 0, .05);
}

.fpb-icon-badge {
    position: absolute;
    top: 6px;
    right: 7px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--fpb-danger);
    box-shadow: 0 0 0 2px var(--fpb-glass-light);
}

.fpb-profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 4px 8px 4px 4px;
    border-radius: 999px;
    color: inherit;
    transition: background .2s ease;
}
.fpb-profile-btn:hover {
    background: rgba(0, 0, 0, .05);
}

.fpb-avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fpb-indigo), var(--fpb-cyan));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .85rem;
    flex-shrink: 0;
}

.fpb-dropdown {
    position: relative;
}

.fpb-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 300px;
    max-height: 380px;
    overflow-y: auto;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    z-index: 30;
}

.fpb-dropdown-menu-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.fpb-dropdown-header {
    font-size: .75rem;
    text-transform: uppercase;
    opacity: .6;
    font-weight: 700;
    padding: 8px 10px 4px;
}

.fpb-dropdown-empty {
    padding: 20px 10px;
    text-align: center;
    opacity: .6;
    font-size: .85rem;
}

.fpb-dropdown-item {
    padding: 9px 10px;
    border-radius: 10px;
    transition: background .15s ease;
}
.fpb-dropdown-item:hover {
    background: rgba(0, 0, 0, .04);
}

.fpb-dropdown-footer {
    display: block;
    text-align: center;
    padding: 10px;
    font-size: .8rem;
    font-weight: 600;
    border-top: 1px solid var(--fpb-border-light);
    margin-top: 4px;
}

.fpb-dropdown-item-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    color: inherit;
    font-size: .88rem;
    transition: background .15s ease;
}
.fpb-dropdown-item-link:hover {
    background: rgba(0, 0, 0, .04);
    color: inherit;
}

.fpb-sidebar-backdrop {
    display: none;
}

@media (max-width: 992px) {
    .fpb-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 50;
        margin: 0;
        border-radius: 0;
        transform: translateX(-105%);
        transition: transform .3s ease;
    }
    .fpb-sidebar.fpb-sidebar-open {
        transform: translateX(0);
    }
    .fpb-sidebar-collapse-btn { display: none; }
    .fpb-hamburger { display: block; }
    .fpb-topbar { margin-right: 12px; }
    .fpb-topbar-search { max-width: none; }
    .fpb-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .4);
        z-index: 40;
        opacity: 0;
        visibility: hidden;
        transition: opacity .25s ease, visibility .25s ease;
    }
    .fpb-sidebar-backdrop-visible {
        opacity: 1;
        visibility: visible;
    }
}

.fpb-stat-card {
    padding: 22px;
}

.fpb-stat-card .fpb-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
}

.fpb-widget-card {
    position: relative;
    overflow: hidden;
}

.fpb-widget-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
    box-shadow: 0 8px 18px rgba(79, 70, 229, .28);
}

.fpb-alert-card {
    transition: transform .2s ease, box-shadow .2s ease;
}
.fpb-alert-card:hover {
    transform: translateY(-2px);
}

.min-w-0 {
    min-width: 0;
}

.fpb-skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,.15) 25%, rgba(255,255,255,.35) 37%, rgba(255,255,255,.15) 63%);
    background-size: 400% 100%;
    animation: fpbSkeleton 1.4s ease infinite;
    border-radius: 10px;
}

@keyframes fpbSkeleton {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* Poster placeholder editor */
.fpb-ph-box.selected {
    z-index: 5;
}
#editorStage {
    touch-action: none;
}

/* My Poster History cards */
.fpb-history-card {
    background: var(--fpb-glass-light);
    border: 1px solid var(--fpb-border-light);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--fpb-shadow-light);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: transform .25s ease, box-shadow .25s ease;
    display: flex;
    flex-direction: column;
}

body.dark-mode .fpb-history-card {
    background: var(--fpb-glass-dark);
    border-color: var(--fpb-border-dark);
    box-shadow: var(--fpb-shadow-dark);
}

.fpb-history-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(124, 92, 255, .25);
}

.fpb-history-thumb {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: rgba(0, 0, 0, .06);
}

.fpb-history-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.fpb-history-card:hover .fpb-history-thumb img {
    transform: scale(1.08);
}

.fpb-history-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, 0) 45%);
    display: flex;
    align-items: flex-end;
    padding: 10px;
    opacity: 0;
    transition: opacity .25s ease;
}

.fpb-history-card:hover .fpb-history-overlay {
    opacity: 1;
}

.fpb-history-stats {
    display: flex;
    gap: 10px;
}

.fpb-history-stats span {
    background: rgba(255, 255, 255, .18);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: .72rem;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ============================================================
   Premium data tables - applies to every .table inside a
   .fpb-glass-card across the whole app, no per-page markup needed
   ============================================================ */
.fpb-glass-card .table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.fpb-glass-card .table thead th {
    text-transform: uppercase;
    font-size: .72rem;
    letter-spacing: .04em;
    font-weight: 700;
    opacity: .6;
    border-bottom: 1px solid var(--fpb-border-light);
    padding: 12px 14px;
    background: transparent;
    position: sticky;
    top: 0;
    z-index: 2;
}

body.dark-mode .fpb-glass-card .table thead th {
    border-bottom-color: var(--fpb-border-dark);
}

.fpb-glass-card .table tbody td {
    padding: 13px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, .045);
    vertical-align: middle;
}

body.dark-mode .fpb-glass-card .table tbody td {
    border-bottom-color: rgba(255, 255, 255, .05);
}

.fpb-glass-card .table tbody tr {
    transition: background .15s ease;
}

.fpb-glass-card .table tbody tr:hover {
    background: linear-gradient(90deg, rgba(79, 70, 229, .06), rgba(6, 182, 212, .04));
}

.fpb-glass-card .table tbody tr:last-child td {
    border-bottom: none;
}

.fpb-glass-card .table-responsive {
    border-radius: 16px;
}

/* Lightweight client-side quick-filter, auto-injected by table-enhance.js
   above any data table that doesn't already have a server-side search */
.fpb-table-quickfilter {
    position: relative;
    max-width: 280px;
    margin-bottom: 14px;
}
.fpb-table-quickfilter i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    opacity: .5;
    font-size: .85rem;
}
.fpb-table-quickfilter input {
    width: 100%;
    padding: 7px 12px 7px 32px;
    border-radius: 999px;
    border: 1px solid var(--fpb-border-light);
    background: rgba(255, 255, 255, .5);
    font-size: .85rem;
    color: inherit;
}
body.dark-mode .fpb-table-quickfilter input {
    background: rgba(255, 255, 255, .05);
    border-color: var(--fpb-border-dark);
}
.fpb-table-quickfilter input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .18);
}

/* ============================================================
   Premium forms - required-field indicator, better focus states,
   file upload preview thumbnails (injected by upload-preview.js)
   ============================================================ */
.form-label .fpb-required::after {
    content: ' *';
    color: var(--fpb-danger);
}

.form-control,
.form-select {
    transition: border-color .18s ease, box-shadow .18s ease, background .2s ease;
}

.was-validated .form-control:invalid,
.form-control.is-invalid {
    border-color: var(--fpb-danger);
}
.was-validated .form-control:valid,
.form-control.is-valid {
    border-color: var(--fpb-success);
}

.fpb-upload-preview {
    display: none;
    margin-top: 10px;
    align-items: center;
    gap: 10px;
}
.fpb-upload-preview.fpb-upload-preview-visible {
    display: flex;
}
.fpb-upload-preview img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--fpb-border-light);
}
body.dark-mode .fpb-upload-preview img {
    border-color: var(--fpb-border-dark);
}
.fpb-upload-preview .fpb-upload-preview-name {
    font-size: .8rem;
    opacity: .75;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================================
   Premium modals - frosted glass, smooth entrance
   ============================================================ */
.modal-content {
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--fpb-border-light);
    border-radius: 18px;
    box-shadow: var(--fpb-shadow-light);
}
body.dark-mode .modal-content {
    background: rgba(23, 26, 44, .96);
    border-color: var(--fpb-border-dark);
    box-shadow: var(--fpb-shadow-dark);
}
.modal-header, .modal-footer {
    border-color: var(--fpb-border-light);
}
body.dark-mode .modal-header,
body.dark-mode .modal-footer {
    border-color: var(--fpb-border-dark);
}
.modal.fade .modal-dialog {
    transform: translateY(20px) scale(.97);
    transition: transform .25s ease, opacity .25s ease;
}
.modal.show .modal-dialog {
    transform: translateY(0) scale(1);
}
.modal-backdrop.show {
    opacity: .55;
}

/* Toast notifications */
.toast {
    background: var(--fpb-glass-light);
    backdrop-filter: blur(20px);
    border: 1px solid var(--fpb-border-light);
    border-radius: 14px;
}
body.dark-mode .toast {
    background: var(--fpb-glass-dark);
    border-color: var(--fpb-border-dark);
}

/* ============================================================
   Premium profile header - cover banner + overlapping avatar
   ============================================================ */
.fpb-profile-header {
    overflow: hidden;
}

.fpb-profile-cover {
    height: 130px;
    background: linear-gradient(120deg, var(--fpb-indigo), var(--fpb-royal-blue) 45%, var(--fpb-cyan));
    background-size: 200% 200%;
    animation: fpbGradientMove 12s ease infinite;
    position: relative;
}

@keyframes fpbGradientMove {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.fpb-profile-header-body {
    display: flex;
    align-items: flex-end;
    gap: 18px;
    padding: 0 24px 20px;
    margin-top: -48px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.fpb-profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--fpb-glass-light);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
    flex-shrink: 0;
    background: #fff;
    position: relative;
    z-index: 2;
}

body.dark-mode .fpb-profile-avatar {
    border-color: #171a2c;
}

.fpb-plan-badge {
    background: linear-gradient(135deg, var(--fpb-gold), #f97316);
    color: #fff;
}

.fpb-social-icon-link {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    opacity: .75;
    transition: opacity .2s ease, transform .2s ease;
}
.fpb-social-icon-link:hover {
    opacity: 1;
    transform: translateY(-2px);
    color: inherit;
}
body.dark-mode .fpb-social-icon-link {
    background: rgba(255, 255, 255, .08);
}

@media (max-width: 576px) {
    .fpb-profile-header-body {
        flex-direction: column;
        align-items: flex-start;
        margin-top: -40px;
    }
    .fpb-profile-avatar {
        width: 80px;
        height: 80px;
    }
}
