/* =========================================================
   FoundryPress Hub Stylesheet
   ---------------------------------------------------------
   Professional admin UI for Hub dashboards, tools, forms,
   cards, dropdown navigation, Pro modules, and license panels.

   Drop-in safe:
   - Preserves existing FoundryPress Hub class names.
   - Does not depend on public site CSS.
   - Keeps Core/Pro UI compatible.
   ========================================================= */


/* =========================================================
   01. Design Tokens
   ========================================================= */

:root {
    --hub-bg: #f5f7fb;
    --hub-surface: #ffffff;
    --hub-surface-soft: #f8fafc;
    --hub-surface-tint: #eef5ff;

    --hub-text: #102033;
    --hub-text-soft: #5f6f82;
    --hub-text-muted: #7a8a9b;

    --hub-border: #dbe4ee;
    --hub-border-strong: #c9d6e5;

    --hub-primary: #2563eb;
    --hub-primary-dark: #1d4ed8;
    --hub-primary-soft: #e8f0ff;

    --hub-success-bg: #ecfdf3;
    --hub-success-border: #abefc6;
    --hub-success-text: #027a48;

    --hub-error-bg: #fef3f2;
    --hub-error-border: #fecdca;
    --hub-error-text: #b42318;

    --hub-warning-bg: #fff8e6;
    --hub-warning-border: #ffe0a3;
    --hub-warning-text: #9a5b00;

    --hub-shadow-sm: 0 1px 2px rgba(16, 32, 51, 0.05);
    --hub-shadow: 0 10px 28px rgba(16, 32, 51, 0.08);
    --hub-shadow-lg: 0 18px 48px rgba(16, 32, 51, 0.11);

    --hub-radius: 18px;
    --hub-radius-sm: 12px;
    --hub-radius-xs: 9px;

    --hub-max: 1180px;
    --hub-focus: 0 0 0 4px rgba(37, 99, 235, 0.14);
}


/* =========================================================
   02. Base / Reset
   ========================================================= */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    display: block;
    min-height: 100vh;
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 30rem),
        var(--hub-bg);
    color: var(--hub-text);
    line-height: 1.55;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
svg {
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    box-shadow: var(--hub-focus);
}


/* =========================================================
   03. Layout Shell
   ========================================================= */

.hub-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
}

.hub-main {
    flex: 1 0 auto;
    width: min(100% - 2rem, var(--hub-max));
    max-width: var(--hub-max);
    margin: 0 auto;
    padding: 0.65rem 0 3rem;
}

.hub-main > *:first-child {
    margin-top: 0;
}


/* =========================================================
   04. Topbar / Brand / Navigation
   ========================================================= */

.hub-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--hub-border);
    box-shadow: var(--hub-shadow-sm);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.hub-topbar__inner {
    width: min(100% - 2rem, var(--hub-max));
    min-height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.hub-brand,
.site-logo {
    display: inline-flex;
    align-items: center;
    min-width: max-content;
}

.hub-topbar .site-logo__img {
    display: block;
    width: auto;
    height: 38px;
}

.hub-brand__link {
    display: inline-flex;
    flex-direction: column;
    gap: 0.05rem;
}

.hub-brand__eyebrow {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--hub-primary);
    font-weight: 800;
}

.hub-brand__title {
    font-size: 1.15rem;
    line-height: 1.1;
    font-weight: 800;
    color: var(--hub-text);
}

.hub-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.35rem;
}

.hub-nav__link,
.hub-nav__button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0.55rem 0.85rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--hub-text-soft);
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition:
        background-color 0.16s ease,
        color 0.16s ease,
        transform 0.16s ease;
}

.hub-nav__link:hover,
.hub-nav__link.is-active,
.hub-nav__button:hover,
.hub-nav__dropdown:focus-within > .hub-nav__button {
    background: var(--hub-primary-soft);
    color: var(--hub-primary-dark);
}

.hub-nav__link:hover,
.hub-nav__button:hover {
    transform: translateY(-1px);
}


/* Navigation Dropdowns */

.hub-nav__dropdown {
    position: relative;
    display: inline-block; /* important */
}

.hub-nav__menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 210px;

    display: none;
    flex-direction: column;

    padding: 0.4rem;
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: 14px;
    box-shadow: var(--hub-shadow);
    z-index: 999; /* make sure it sits above header */
}

.hub-nav__dropdown:hover .hub-nav__menu,
.hub-nav__dropdown:focus-within .hub-nav__menu {
    display: flex;
}

/* =========================================================
   05. Page Intro / Hero
   ========================================================= */

.hub-hero {
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius);
    background: linear-gradient(135deg, #ffffff 0%, var(--hub-surface-tint) 100%);
    box-shadow: var(--hub-shadow-sm);
}

.hub-hero__content {
    max-width: 760px;
}

.hub-hero__actions,
.hub-section__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}

.hub-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.65rem;
    font-size: 0.74rem;
    font-weight: 850;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--hub-primary);
}

.hub-hero h1 {
    margin: 0 0 0.55rem;
    font-size: clamp(1.65rem, 3vw, 2.35rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hub-hero p {
    max-width: 66ch;
    margin: 0;
    color: var(--hub-text-soft);
    font-size: 1rem;
}


/* =========================================================
   06. Sections / Headings
   ========================================================= */

.hub-section {
    margin: 0;
}

.hub-section + .hub-section {
    margin-top: 1.15rem;
}

.hub-section__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 0 0.8rem;
}

.hub-section__head h1,
.hub-section__head h2 {
    margin: 0 0 0.25rem;
    font-size: 1.35rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.hub-section__head p {
    margin: 0;
    color: var(--hub-text-soft);
}

.hub-section__head code {
    padding: 0.12rem 0.32rem;
    border-radius: 6px;
    background: var(--hub-primary-soft);
    color: var(--hub-primary-dark);
    font-size: 0.9em;
}


/* =========================================================
   07. Grid / Cards
   ========================================================= */

.hub-card-grid,
.hub-library-grid,
.hub-theme-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem;
}

.hub-card,
.hub-library-card,
.hub-theme-card {
    min-width: 0;
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius);
    box-shadow: var(--hub-shadow-sm);
    padding: 1.25rem;
    transition:
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        transform 0.16s ease;
}

.hub-card {
    grid-column: span 6;
}

.hub-library-card {
    grid-column: span 12;
}

.hub-theme-card {
    grid-column: span 6;
}

.hub-card:hover,
.hub-library-card:hover,
.hub-theme-card:hover {
    border-color: var(--hub-border-strong);
    box-shadow: var(--hub-shadow);
    transform: translateY(-1px);
}

.hub-card--soft {
    background: var(--hub-surface-soft);
}

.hub-card h3,
.hub-library-card h3,
.hub-theme-card h3 {
    margin: 0 0 0.45rem;
    font-size: 1.08rem;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.hub-card p,
.hub-library-card p,
.hub-theme-card p {
    margin: 0;
    color: var(--hub-text-soft);
}

.hub-card p + p,
.hub-panel p + p {
    margin-top: 0.7rem;
}

.hub-card__tag,
.hub-card__meta {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 0.75rem;
    padding: 0.36rem 0.58rem;
    border-radius: 999px;
    background: var(--hub-primary-soft);
    color: var(--hub-primary-dark);
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.hub-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
}

.hub-card__link {
    display: inline-flex;
    align-items: center;
    font-weight: 800;
    color: var(--hub-primary-dark);
}

.hub-card__link:hover {
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.hub-card__meta-text {
    margin-top: 0.65rem;
    color: var(--hub-text-muted);
    font-size: 0.92rem;
}


/* =========================================================
   08. Panels / Containers
   ========================================================= */

.hub-panel {
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: 22px;
    box-shadow: var(--hub-shadow-sm);
    padding: 1.35rem;
}

.hub-panel + .hub-panel {
    margin-top: 1rem;
}

.hub-panel__content > *:first-child {
    margin-top: 0;
}

.hub-panel__content > *:last-child {
    margin-bottom: 0;
}

.hub-steps {
    margin: 0.75rem 0 0;
    padding-left: 1.25rem;
}

.hub-steps li + li {
    margin-top: 0.35rem;
}


/* =========================================================
   09. Forms
   ========================================================= */

.hub-form {
    display: grid;
    gap: 0.95rem;
    margin-top: 0.5rem;
}

.hub-form__group {
    display: grid;
    gap: 0.4rem;
}

.hub-form__group label,
.seo-field label {
    color: var(--hub-text);
    font-size: 0.92rem;
    font-weight: 800;
}

.hub-form__group input,
.hub-form__group select,
.hub-form__group textarea,
.seo-field input,
.seo-field select,
.seo-field textarea {
    width: 100%;
    border: 1px solid var(--hub-border);
    border-radius: 12px;
    padding: 0.78rem 0.9rem;
    background: #fff;
    box-shadow: var(--hub-shadow-sm);
    color: var(--hub-text);
    transition:
        border-color 0.16s ease,
        box-shadow 0.16s ease;
}

.hub-form__group input,
.hub-form__group select,
.seo-field input,
.seo-field select {
    min-height: 46px;
}

.hub-form__group textarea,
.seo-field textarea {
    min-height: 126px;
    resize: vertical;
}

.hub-form__group input:focus,
.hub-form__group select:focus,
.hub-form__group textarea:focus,
.seo-field input:focus,
.seo-field select:focus,
.seo-field textarea:focus {
    border-color: var(--hub-primary);
}

.hub-form__actions,
.seo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
}

.hub-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
}

.hub-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--hub-primary);
}


/* =========================================================
   10. Buttons
   ========================================================= */

.hub-btn,
.button,
button[type="submit"] {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.72rem 1.05rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition:
        background-color 0.16s ease,
        border-color 0.16s ease,
        color 0.16s ease,
        transform 0.16s ease,
        box-shadow 0.16s ease;
}

.hub-btn:hover,
.button:hover,
button[type="submit"]:hover {
    transform: translateY(-1px);
}

.hub-btn--primary,
.button-primary,
button[type="submit"] {
    background: var(--hub-primary);
    color: #fff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.hub-btn--primary:hover,
.button-primary:hover,
button[type="submit"]:hover {
    background: var(--hub-primary-dark);
}

.hub-btn--secondary,
.button:not(.button-primary) {
    background: #fff;
    border-color: var(--hub-border);
    color: var(--hub-text);
}

.hub-btn--secondary:hover,
.button:not(.button-primary):hover {
    background: var(--hub-surface-soft);
    border-color: var(--hub-border-strong);
}


/* =========================================================
   11. Alerts / Messages
   ========================================================= */

.hub-alert,
.seo-message,
.seo-error {
    border: 1px solid transparent;
    border-radius: 13px;
    padding: 0.88rem 1rem;
    margin-bottom: 1rem;
    font-weight: 750;
}

.hub-alert--success,
.seo-message {
    background: var(--hub-success-bg);
    border-color: var(--hub-success-border);
    color: var(--hub-success-text);
}

.hub-alert--error,
.seo-error {
    background: var(--hub-error-bg);
    border-color: var(--hub-error-border);
    color: var(--hub-error-text);
}

.hub-alert--warning {
    background: var(--hub-warning-bg);
    border-color: var(--hub-warning-border);
    color: var(--hub-warning-text);
}


/* =========================================================
   12. Prompt Tools
   ========================================================= */

.hub-output-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 0.9rem;
}

.hub-prompt-output {
    width: 100%;
    min-height: 360px;
    border: 1px solid var(--hub-border);
    border-radius: 14px;
    padding: 1rem;
    background: #fbfdff;
    box-shadow: var(--hub-shadow-sm);
    color: var(--hub-text);
    line-height: 1.6;
    resize: vertical;
}


/* =========================================================
   13. Prompt Library
   ========================================================= */

.hub-library-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.hub-library-card__brand {
    font-weight: 800;
    color: var(--hub-text-soft);
}

.hub-library-card__date {
    margin-top: 0.65rem;
    margin-bottom: 0.85rem;
    color: var(--hub-text-muted);
    font-size: 0.92rem;
}


/* =========================================================
   14. Theme Cards
   ========================================================= */

.hub-theme-card.is-current {
    border-color: var(--hub-primary);
    box-shadow: var(--hub-focus), var(--hub-shadow);
}

.hub-theme-card__preview {
    margin-bottom: 0.9rem;
    padding: 0.85rem;
    border: 1px solid var(--hub-border);
    border-radius: 16px;
    background: var(--hub-surface-soft);
}

.hub-theme-card__surface {
    min-height: 130px;
    padding: 0.9rem;
    border: 1px solid;
    border-radius: 13px;
}

.hub-theme-card__line {
    height: 9px;
    margin-bottom: 0.55rem;
    border-radius: 999px;
}

.hub-theme-card__line--title {
    width: 65%;
    height: 13px;
}

.hub-theme-card__accent {
    width: 86px;
    height: 30px;
    margin-top: 0.9rem;
    border-radius: 999px;
}

.hub-theme-card__swatches {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.9rem;
    margin-bottom: 0.9rem;
}

.hub-theme-card__swatches span {
    width: 23px;
    height: 23px;
    border: 1px solid rgba(16, 32, 51, 0.12);
    border-radius: 999px;
}

.hub-theme-card__form {
    margin-top: 0.45rem;
}


/* =========================================================
   15. Pro SEO Manager
   ========================================================= */

.seo-wrap {
    width: min(100% - 2rem, var(--hub-max));
    margin: 0.9rem auto 3rem;
    padding: 0;
}

.seo-card {
    margin-bottom: 1rem;
    padding: 1.25rem;
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius);
    background: var(--hub-surface);
    box-shadow: var(--hub-shadow-sm);
}

.seo-card .seo-card {
    background: var(--hub-surface-soft);
}

.seo-card h1 {
    margin: 0 0 0.45rem;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.seo-card h2 {
    margin: 0 0 0.9rem;
    font-size: 1.18rem;
    letter-spacing: -0.015em;
}

.seo-card p {
    color: var(--hub-text-soft);
}

.seo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.seo-field {
    display: grid;
    gap: 0.4rem;
}


/* =========================================================
   16. License Card
   ========================================================= */

.fp-license-card {
    margin-top: 1rem;
    padding: 1.25rem;
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius);
    background: var(--hub-surface);
    box-shadow: var(--hub-shadow-sm);
}

.fp-license-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.fp-license-card__title {
    margin: 0;
    color: var(--hub-text);
    font-size: 1.12rem;
    font-weight: 800;
}

.fp-license-card__subtitle {
    margin: 0.3rem 0 0;
    color: var(--hub-text-soft);
    font-size: 0.94rem;
    line-height: 1.5;
}

.fp-license-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.46rem 0.72rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 850;
    white-space: nowrap;
}

.fp-license-status--active {
    background: var(--hub-success-bg);
    color: var(--hub-success-text);
    border: 1px solid var(--hub-success-border);
}

.fp-license-status--invalid,
.fp-license-status--expired,
.fp-license-status--revoked {
    background: var(--hub-error-bg);
    color: var(--hub-error-text);
    border: 1px solid var(--hub-error-border);
}

.fp-license-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.fp-license-item {
    padding: 0.82rem 0.9rem;
    border: 1px solid var(--hub-border);
    border-radius: 13px;
    background: var(--hub-surface-soft);
}

.fp-license-item--full {
    grid-column: 1 / -1;
}

.fp-license-label {
    display: block;
    margin-bottom: 0.28rem;
    color: var(--hub-text-muted);
    font-size: 0.75rem;
    font-weight: 850;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.fp-license-value {
    display: block;
    color: var(--hub-text);
    font-size: 0.96rem;
    line-height: 1.45;
    word-break: break-word;
}


/* =========================================================
   17. Footer
   ========================================================= */

.hub-footer {
    flex-shrink: 0;
    border-top: 1px solid var(--hub-border);
    background: rgba(255, 255, 255, 0.8);
}

.hub-footer__inner {
    width: min(100% - 2rem, var(--hub-max));
    margin: 0 auto;
    padding: 1rem 0 1.5rem;
    color: var(--hub-text-muted);
    font-size: 0.92rem;
}


/* =========================================================
   18. Responsive
   ========================================================= */

@media (max-width: 1020px) {
    .hub-topbar__inner {
        align-items: flex-start;
        padding: 0.6rem 0;
    }

    .hub-nav {
        justify-content: flex-end;
    }
}

@media (max-width: 900px) {
    .hub-main,
    .seo-wrap {
        width: min(100% - 1.25rem, var(--hub-max));
        padding-bottom: 2rem;
    }

    .hub-topbar__inner {
        min-height: 60px;
        flex-direction: column;
        align-items: flex-start;
    }

    .hub-nav {
        width: 100%;
        justify-content: flex-start;
    }

    .hub-nav__link,
    .hub-nav__button {
        min-height: 36px;
        padding: 0.48rem 0.72rem;
        font-size: 0.9rem;
    }

    .hub-nav__menu {
        right: auto;
        left: 0;
    }

    .hub-card,
    .hub-library-card,
    .hub-theme-card {
        grid-column: span 12;
    }

    .hub-hero {
        padding: 1.4rem;
        border-radius: 20px;
    }

    .hub-section__head {
        display: block;
    }

    .hub-section__actions {
        margin-top: 0.75rem;
    }

    .seo-grid,
    .fp-license-grid {
        grid-template-columns: 1fr;
    }

    .fp-license-card__header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 560px) {
    .hub-main,
    .seo-wrap {
        width: min(100% - 1rem, var(--hub-max));
        padding-top: 0.65rem;
    }

    .hub-card,
    .hub-library-card,
    .hub-theme-card,
    .hub-panel,
    .seo-card,
    .fp-license-card {
        padding: 1rem;
        border-radius: 16px;
    }

    .hub-hero {
        padding: 1.15rem;
    }

    .hub-form__actions,
    .hub-card__actions,
    .seo-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hub-btn,
    .button,
    button[type="submit"] {
        width: 100%;
    }
}


/* =========================================================
   19. Reduced Motion
   ========================================================= */

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

/* ==========================================
   LICENSE OVERVIEW CARD
========================================== */

.license-overview-card {
    padding: 30px;
}

.license-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.license-title {
    margin-top: 8px;
    font-size: 2rem;
    font-weight: 700;
}

.license-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    width: 100%;
    margin-top: 20px;
}

.license-item {
    display: block;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

.license-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #64748b;
    margin-bottom: 8px;
}

.license-item strong {
    display: block;
    font-size: 16px;
    color: #0f172a;
}

.license-message {
    margin-top: 24px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 14px;
    color: #475569;
}

.license-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 82px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1;
    text-transform: capitalize;
}

.license-badge--active {
    background: #e7f8ee;
    color: #18794e;
    border: 1px solid #b7ebc9;
}

.license-badge--inactive {
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
}
.license-subtitle {
    margin-top: 10px;
    font-size: 0.95rem;
    color: #64748b;
    max-width: 500px;
}
.hub-form input[type="checkbox"] {
    width: auto;
    min-width: auto;
    height: auto;
    display: inline-block;
    margin: 0 0.5rem 0 0;
    box-shadow: none;
}

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

.hub-checkbox-row input[type="checkbox"] {
    flex: 0 0 auto;
}

/* =========================================================
   20. Optional Plan / Feature Badges
   ---------------------------------------------------------
   Safe for both Core and Pro. These classes are only visible
   when matching Hub markup is present.
   ========================================================= */

.hub-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hub-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
}

.hub-badge--pro {
    background: rgba(30, 115, 190, 0.12);
    color: #165a96;
    border: 1px solid rgba(30, 115, 190, 0.18);
}

.hub-badge--core {
    background: #f1ede4;
    color: #5b6470;
    border: 1px solid #ddd6c8;
}

.hub-badge--success {
    background: var(--hub-success-bg);
    color: var(--hub-success-text);
    border: 1px solid var(--hub-success-border);
}

.hub-badge--warning {
    background: var(--hub-warning-bg);
    color: var(--hub-warning-text);
    border: 1px solid var(--hub-warning-border);
}

.hub-badge--error {
    background: var(--hub-error-bg);
    color: var(--hub-error-text);
    border: 1px solid var(--hub-error-border);
}
/* =========================================================
   20. Core/Pro Shared Compatibility Helpers
   ========================================================= */

/* Alias used by some Hub pages that predate the hub-kicker class. */
.site-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.65rem;
    font-size: 0.74rem;
    font-weight: 850;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--hub-primary);
}

/* Full-width form rows for mixed grid/form layouts. */
.hub-form__group--full {
    grid-column: 1 / -1;
}

/* Pro Forms module cards. Inline styles in older Pro files still work, but these
   rules make the shared stylesheet the preferred source of presentation. */
.fp-pro-form-item {
    margin-bottom: 1.25rem;
    padding: 1rem;
    border: 1px solid var(--hub-border);
    border-radius: 14px;
    background: var(--hub-surface);
    box-shadow: var(--hub-shadow-sm);
}

.fp-pro-form-item + .fp-pro-form-item {
    margin-top: 1rem;
}

.fp-remove-form {
    flex: 0 0 auto;
}

/* =========================================================
   21. Hub Login Page
   ---------------------------------------------------------
   The login screen does not use the normal Hub container
   layout. Keep these rules isolated so public/admin layouts
   do not fight with the login card.
   ========================================================= */

.hub-login-page {
    width: 100%;
    min-height: calc(100vh - 86px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.hub-login-card {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

.hub-login-card .hub-panel {
    width: 100%;
    padding: 2rem;
}

.hub-login-card h1 {
    margin-top: 0.5rem;
}

.hub-login-card .hub-form {
    margin-top: 1rem;
}

.hub-footer {
    width: 100%;
    border-top: 1px solid var(--hub-border);
    background: rgba(255, 255, 255, 0.8);
    text-align: center;
}

.hub-footer__inner {
    width: min(100% - 2rem, var(--hub-max));
    margin: 0 auto;
    padding: 1rem 0 1.5rem;
    color: var(--hub-text-muted);
    font-size: 0.92rem;
    text-align: center;
}

@media (max-width: 560px) {
    .hub-login-page {
        min-height: calc(100vh - 96px);
        padding: 1.25rem 1rem;
    }

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

/* =========================================================
   Article Markup Modal
   ========================================================= */

.hub-markup-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.hub-markup-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(3px);
}

.hub-markup-modal__panel {
    position: relative;
    max-width: 820px;
    margin: 5vh auto;
    padding: 2rem;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
    overflow: auto;
    max-height: 90vh;
}

.hub-markup-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: 0;
    background: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.hub-editor-guide__grid {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.hub-editor-guide code {
    display: block;
    margin-top: 0.35rem;
    padding: 0.7rem;
    border-radius: 10px;
    background: #eef4fb;
    overflow-x: auto;
    white-space: pre-wrap;
    font-family: monospace;
}

/* =========================================================
   Hub Modal
   ========================================================= */

.hub-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.hub-modal[hidden] {
    display: none;
}

.hub-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(3px);
}

.hub-modal__panel {
    position: relative;
    width: min(92vw, 820px);
    max-height: 90vh;
    margin: 5vh auto;
    overflow: auto;
    padding: 2rem;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.hub-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
}

.hub-modal pre {
    overflow-x: auto;
    padding: 1rem;
    border-radius: 12px;
    background: #f4f7fb;
}

.hub-modal code {
    font-family: monospace;
    white-space: pre-wrap;
}

.hub-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 5vh 1rem;
}

.hub-modal[hidden] {
    display: none;
}

.hub-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
}

.hub-modal__panel {
    position: relative;
    width: min(100%, 820px);
    max-height: 90vh;
    overflow: auto;
    padding: 2rem;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.hub-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 1.5rem;
}

.hub-modal pre {
    padding: 1rem;
    border-radius: 12px;
    background: #f4f7fb;
    overflow-x: auto;
}

.hub-modal code {
    white-space: pre-wrap;
}

.hub-btn--small {
    min-height: 34px;
    padding: 0.45rem 0.8rem;
    font-size: 0.85rem;
}

button.hub-nav__link {
    border: 0;
    background: #eef3ff;
    cursor: pointer;
}

button.hub-nav__link:hover {
    background: #dfe9ff;
}

.hub-form__label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.fp-divider {
    margin: 2rem 0;
    border: 0;
    border-top: 1px solid rgba(15, 23, 42, 0.14);
}

.fp-callout {
    margin: 1.5rem 0;
    padding: 1.25rem 1.4rem;
    border-left: 6px solid #2563eb;
    border-radius: 16px;
    background: #eff6ff;
    color: #1e293b;
}

.fp-list {
    margin: 1rem 0 1.5rem;
    padding-left: 1.4rem;
}

.fp-list li {
    margin: 0.45rem 0;
}

.article-code {
    margin: 1.5rem 0;
    padding: 1rem;
    overflow-x: auto;
    border-radius: 14px;
    background: #0f172a;
    color: #f8fafc;
}

.article-code code {
    font-family: monospace;
    font-size: 0.9rem;
    white-space: pre;
}

/* =========================================================
   22. FoundryPress Hub 1.1.0 Visual Refresh
   ---------------------------------------------------------
   Sidebar dashboard shell inspired by the 1.1.0 marketing
   direction. PHP-only, no framework, no new asset folder.
   ========================================================= */

:root {
    --hub-bg: #0b1120;
    --hub-page-bg: #f6f2ea;
    --hub-sidebar: #0f172a;
    --hub-sidebar-soft: #172033;
    --hub-sidebar-border: rgba(255, 255, 255, 0.08);
    --hub-orange: #f97316;
    --hub-orange-dark: #ea580c;
    --hub-orange-soft: #fff2e8;
    --hub-cream: #fffaf2;
    --hub-text: #172033;
    --hub-text-soft: #5f6b7a;
    --hub-text-muted: #8390a2;
    --hub-border: #e7dccb;
    --hub-border-strong: #d8c6ad;
    --hub-primary: #f97316;
    --hub-primary-dark: #ea580c;
    --hub-primary-soft: #fff2e8;
    --hub-surface: #ffffff;
    --hub-surface-soft: #fbf7f0;
    --hub-surface-tint: #fff2e8;
    --hub-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --hub-shadow: 0 18px 42px rgba(15, 23, 42, 0.10);
    --hub-shadow-lg: 0 24px 70px rgba(15, 23, 42, 0.14);
    --hub-focus: 0 0 0 4px rgba(249, 115, 22, 0.18);
    --hub-radius: 22px;
    --hub-max: 1280px;
}

body.hub-admin {
    background:
        radial-gradient(circle at 20% 0%, rgba(249, 115, 22, 0.16), transparent 28rem),
        linear-gradient(135deg, #fbf7f0 0%, #f4efe6 45%, #f8fafc 100%);
}

.hub-shell {
    display: grid;
    grid-template-columns: 284px minmax(0, 1fr);
    min-height: 100vh;
    background: transparent;
}

/* Sidebar */
.hub-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 1.2rem;
    background:
        radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 16rem),
        linear-gradient(180deg, #0f172a 0%, #111827 100%);
    color: #e5edf8;
    border-right: 1px solid rgba(255,255,255,0.08);
}

.hub-sidebar__brand {
    display: grid;
    gap: 0.9rem;
    padding: 0.4rem 0.2rem 1.2rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--hub-sidebar-border);
}

.hub-sidebar__logo {
    display: inline-flex;
    align-items: center;
    width: fit-content;
}

.hub-sidebar .site-logo__img,
.hub-mobilebar .site-logo__img {
    display: block;
    width: auto;
    max-width: 190px;
    height: 42px;
    object-fit: contain;
}

.hub-sidebar__meta {
    display: grid;
    gap: 0.15rem;
}

.hub-sidebar__eyebrow,
.hub-nav__label {
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hub-sidebar__eyebrow {
    color: #fed7aa;
}

.hub-sidebar__meta strong {
    color: #ffffff;
    font-size: 1rem;
    line-height: 1.25;
}

.hub-nav {
    display: grid;
    gap: 1rem;
    justify-content: stretch;
    align-items: stretch;
}

.hub-nav__section {
    display: grid;
    gap: 0.26rem;
}

.hub-nav__label {
    margin: 0.5rem 0 0.25rem;
    color: rgba(226, 232, 240, 0.54);
}

.hub-nav__link,
.hub-nav__button {
    justify-content: flex-start;
    width: 100%;
    min-height: 40px;
    padding: 0.68rem 0.85rem;
    border-radius: 13px;
    color: rgba(226, 232, 240, 0.82);
    background: transparent;
    font-size: 0.94rem;
    font-weight: 760;
}

.hub-nav__link:hover,
.hub-nav__link.is-active,
.hub-nav__button:hover,
.hub-nav__dropdown:focus-within > .hub-nav__button {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: none;
}

.hub-nav__link.is-active {
    background: linear-gradient(135deg, var(--hub-orange) 0%, #fb923c 100%);
    box-shadow: 0 14px 28px rgba(249, 115, 22, 0.22);
}

.hub-nav__link--upgrade {
    color: #fed7aa;
    border: 1px solid rgba(249, 115, 22, 0.35);
    background: rgba(249, 115, 22, 0.08);
}

.hub-nav__note {
    display: block;
    padding: 0.72rem 0.85rem;
    border-radius: 13px;
    background: rgba(255,255,255,0.06);
    color: #fed7aa;
    font-size: 0.9rem;
    font-weight: 760;
}

.hub-sidebar__footer {
    display: grid;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--hub-sidebar-border);
}

.hub-sidebar__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0.6rem 0.8rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: #e5edf8;
    font-weight: 800;
    font-size: 0.9rem;
}

.hub-sidebar__action:hover {
    background: rgba(255,255,255,0.13);
    color: #ffffff;
}

/* Workspace */
.hub-workspace {
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.hub-mobilebar {
    display: none;
}

.hub-main,
.seo-wrap {
    width: min(100% - 2rem, var(--hub-max));
    max-width: var(--hub-max);
    margin: 0 auto;
    padding: 1.4rem 0 3rem;
}

/* Hero/dashboard panels */
.hub-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(1.35rem, 3vw, 2rem);
    margin-bottom: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.36), transparent 20rem),
        linear-gradient(135deg, #111827 0%, #172033 54%, #0f172a 100%);
    box-shadow: var(--hub-shadow-lg);
    color: #ffffff;
}

.hub-hero::after {
    content: "";
    position: absolute;
    right: -4rem;
    bottom: -5rem;
    width: 18rem;
    height: 18rem;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.12);
    pointer-events: none;
}

.hub-hero__content {
    position: relative;
    z-index: 1;
}

.hub-kicker,
.site-kicker {
    color: #fed7aa;
}

.hub-hero h1 {
    max-width: 13ch;
    margin-bottom: 0.7rem;
    font-size: clamp(2rem, 4vw, 3.35rem);
    letter-spacing: -0.055em;
}

.hub-hero p {
    color: rgba(226, 232, 240, 0.82);
    font-size: 1.05rem;
}

.hub-section + .hub-section {
    margin-top: 1.35rem;
}

.hub-section__head {
    padding: 0 0.15rem;
}

.hub-section__head h1,
.hub-section__head h2 {
    font-size: 1.45rem;
    letter-spacing: -0.035em;
}

.hub-card-grid,
.hub-library-grid,
.hub-theme-grid {
    gap: 1rem;
}

.hub-card,
.hub-library-card,
.hub-theme-card,
.hub-panel,
.seo-card,
.fp-license-card,
.license-item {
    border-color: rgba(216, 198, 173, 0.72);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--hub-shadow-sm);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hub-card,
.hub-theme-card {
    grid-column: span 4;
}

.hub-card:hover,
.hub-library-card:hover,
.hub-theme-card:hover {
    border-color: var(--hub-border-strong);
    box-shadow: var(--hub-shadow);
    transform: translateY(-2px);
}

.hub-card__tag,
.hub-card__meta,
.hub-badge--pro,
.hub-badge--core {
    background: var(--hub-orange-soft);
    color: #9a3412;
    border: 1px solid rgba(249, 115, 22, 0.18);
}

.hub-card__link,
.hub-section__head code {
    color: var(--hub-orange-dark);
}

.hub-section__head code {
    background: var(--hub-orange-soft);
}

.hub-panel {
    border-radius: 26px;
}

.hub-form__group input,
.hub-form__group select,
.hub-form__group textarea,
.seo-field input,
.seo-field select,
.seo-field textarea {
    border-color: #e8dcc8;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.95);
}

.hub-form__group input:focus,
.hub-form__group select:focus,
.hub-form__group textarea:focus,
.seo-field input:focus,
.seo-field select:focus,
.seo-field textarea:focus {
    border-color: var(--hub-orange);
}

.hub-btn--primary,
.button-primary,
button[type="submit"] {
    background: linear-gradient(135deg, var(--hub-orange) 0%, #fb923c 100%);
    color: #fff;
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.24);
}

.hub-btn--primary:hover,
.button-primary:hover,
button[type="submit"]:hover {
    background: linear-gradient(135deg, var(--hub-orange-dark) 0%, var(--hub-orange) 100%);
}

.hub-btn--secondary,
.button:not(.button-primary) {
    background: #fffaf4;
    border-color: #e5d4bd;
}

.hub-footer {
    margin-top: auto;
    border-top: 1px solid rgba(216, 198, 173, 0.72);
    background: rgba(255, 250, 242, 0.62);
}

.hub-footer__inner {
    width: min(100% - 2rem, var(--hub-max));
    max-width: var(--hub-max);
    text-align: left;
}

.hub-footer a {
    color: var(--hub-orange-dark);
    font-weight: 800;
}

/* Keep old dropdown markup usable if older pages emit it. */
.hub-nav__dropdown {
    display: grid;
}

.hub-nav__menu {
    position: static;
    display: grid;
    min-width: 0;
    padding: 0.2rem 0 0 0.6rem;
    border: 0;
    border-left: 1px solid rgba(255,255,255,0.10);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.hub-nav__menu .hub-nav__link {
    min-height: 34px;
    padding: 0.48rem 0.7rem;
    font-size: 0.88rem;
}

/* Mobile */
@media (max-width: 1100px) {
    .hub-shell {
        grid-template-columns: 1fr;
    }

    .hub-sidebar {
        position: relative;
        height: auto;
        display: block;
        padding: 1rem;
        border-right: 0;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    .hub-sidebar__brand {
        grid-template-columns: auto 1fr;
        align-items: center;
    }

    .hub-nav {
        display: flex;
        flex-wrap: nowrap;
        gap: 0.75rem;
        overflow-x: auto;
        padding-bottom: 0.35rem;
    }

    .hub-nav__section {
        min-width: 210px;
        flex: 0 0 auto;
    }

    .hub-sidebar__footer {
        display: flex;
        flex-wrap: wrap;
        margin-top: 1rem;
    }

    .hub-main,
    .seo-wrap {
        width: min(100% - 1.25rem, var(--hub-max));
    }

    .hub-card,
    .hub-theme-card {
        grid-column: span 6;
    }
}

@media (max-width: 720px) {
    .hub-sidebar {
        padding: 0.9rem;
    }

    .hub-sidebar .site-logo__img {
        max-width: 160px;
        height: 36px;
    }

    .hub-nav__section {
        min-width: 185px;
    }

    .hub-main,
    .seo-wrap {
        width: min(100% - 1rem, var(--hub-max));
        padding-top: 0.9rem;
    }

    .hub-hero {
        border-radius: 22px;
    }

    .hub-card,
    .hub-library-card,
    .hub-theme-card {
        grid-column: span 12;
    }

    .hub-footer__inner {
        width: min(100% - 1rem, var(--hub-max));
        text-align: center;
    }
}


/* =========================================================
   23. Hub Dashboard Two-Column Cards
   ---------------------------------------------------------
   Keeps License Overview and At A Glance side-by-side on
   desktop, equal height, and stacked on mobile.
   ========================================================= */

.hub-dashboard-overview {
    margin-bottom: 1.35rem;
}

.hub-dashboard-grid {
    display: flex !important;
    gap: 1.5rem !important;
    align-items: stretch !important;
    width: 100% !important;
}

.hub-dashboard-column {
    flex: 1 1 0 !important;
    width: 50% !important;
    min-width: 0 !important;
    display: flex !important;
}

.hub-dashboard-column > .hub-panel {
    width: 100% !important;
    min-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

.hub-dashboard-column .hub-panel__content {
    height: 100% !important;
}


/* =========================================================
   24. Stable Desktop Sidebar + Mobile Drawer
   ---------------------------------------------------------
   Preserves the original 1.1.0 dark navy/orange visual
   direction while preventing the sidebar from becoming page
   content on tablet widths.
   ========================================================= */

/* Desktop/tablet: sidebar stays as the sidebar. */
@media (min-width: 901px) {
    .hub-shell {
        display: grid !important;
        grid-template-columns: 284px minmax(0, 1fr) !important;
        min-height: 100vh !important;
    }

    .hub-sidebar {
        position: sticky !important;
        top: 0 !important;
        height: 100vh !important;
        display: flex !important;
        flex-direction: column !important;
        overflow-y: auto !important;
        padding: 1.2rem !important;
        border-right: 1px solid rgba(255,255,255,0.08) !important;
        border-bottom: 0 !important;
        transform: none !important;
    }

    .hub-mobilebar,
    .hub-mobile-menu__overlay,
    .hub-mobile-menu__close {
        display: none !important;
    }

    .hub-nav {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        overflow: visible !important;
        flex-wrap: initial !important;
        padding-bottom: 0 !important;
    }

    .hub-nav__section {
        min-width: 0 !important;
        width: 100% !important;
        flex: none !important;
    }

    .hub-workspace {
        min-width: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        min-height: 100vh !important;
    }

    .hub-card,
    .hub-theme-card {
        grid-column: span 4;
    }
}

/* Mobile: top bar + off-canvas drawer. */
@media (max-width: 900px) {
    body.hub-menu-open {
        overflow: hidden;
    }

    .hub-shell {
        display: grid !important;
        grid-template-columns: 1fr !important;
        min-height: 100vh !important;
    }

    .hub-mobilebar {
        position: sticky !important;
        top: 0 !important;
        z-index: 10020 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 1rem !important;
        min-height: 68px !important;
        padding: 0.85rem 1rem !important;
        background:
            radial-gradient(circle at top left, rgba(249, 115, 22, 0.20), transparent 14rem),
            linear-gradient(135deg, #0f172a 0%, #111827 100%) !important;
        border-bottom: 1px solid rgba(255,255,255,0.08) !important;
        box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18) !important;
    }

    .hub-mobilebar__brand {
        display: inline-flex !important;
        align-items: center !important;
        min-width: 0 !important;
    }

    .hub-mobilebar__brand .site-logo__img {
        display: block !important;
        width: auto !important;
        max-width: 180px !important;
        height: 36px !important;
        object-fit: contain !important;
    }

    .hub-mobilebar__actions {
        display: none !important;
    }

    .hub-mobilebar__toggle {
        appearance: none !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.45rem !important;
        min-width: 92px !important;
        min-height: 44px !important;
        padding: 0.68rem 0.9rem !important;
        border: 1px solid rgba(255,255,255,0.10) !important;
        border-radius: 999px !important;
        background: linear-gradient(135deg, var(--hub-orange) 0%, #fb923c 100%) !important;
        color: #ffffff !important;
        font-size: 1.15rem !important;
        font-weight: 850 !important;
        line-height: 1 !important;
        box-shadow: 0 12px 24px rgba(249, 115, 22, 0.22) !important;
        cursor: pointer !important;
    }

    .hub-mobilebar__toggle-text {
        font-size: 0.9rem !important;
    }

    .hub-mobile-menu__overlay {
        position: fixed !important;
        inset: 68px 0 0 0 !important;
        z-index: 10000 !important;
        display: block !important;
        pointer-events: none !important;
        background: rgba(15, 23, 42, 0) !important;
        transition: background-color 0.2s ease !important;
    }

    body.hub-menu-open .hub-mobile-menu__overlay {
        pointer-events: auto !important;
        background: rgba(15, 23, 42, 0.62) !important;
    }

    .hub-sidebar.hub-mobile-menu,
    .hub-sidebar {
        position: fixed !important;
        top: 68px !important;
        left: 0 !important;
        right: auto !important;
        bottom: 0 !important;
        z-index: 10010 !important;
        display: flex !important;
        flex-direction: column !important;
        width: min(88vw, 360px) !important;
        max-width: 360px !important;
        height: calc(100vh - 68px) !important;
        padding: 1rem !important;
        overflow-y: auto !important;
        border-right: 1px solid rgba(255,255,255,0.08) !important;
        border-left: 0 !important;
        border-bottom: 0 !important;
        transform: translateX(-110%) !important;
        transition: transform 0.24s ease !important;
        box-shadow: 22px 0 50px rgba(15, 23, 42, 0.32) !important;
    }

    body.hub-menu-open .hub-sidebar.hub-mobile-menu,
    body.hub-menu-open .hub-sidebar {
        transform: translateX(0) !important;
    }

    .hub-sidebar__brand {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 1rem !important;
        grid-template-columns: none !important;
        padding: 0.25rem 0 1rem !important;
        margin-bottom: 0.9rem !important;
    }

    .hub-sidebar .site-logo__img {
        max-width: 175px !important;
        height: 38px !important;
    }

    .hub-mobile-menu__close {
        appearance: none !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 0 0 auto !important;
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        min-height: 42px !important;
        padding: 0 !important;
        border: 1px solid rgba(255,255,255,0.10) !important;
        border-radius: 13px !important;
        background: rgba(255,255,255,0.08) !important;
        color: #ffffff !important;
        font-size: 1.7rem !important;
        line-height: 1 !important;
        cursor: pointer !important;
    }

    .hub-nav {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1.05rem !important;
        overflow: visible !important;
        flex-wrap: initial !important;
        padding-bottom: 0 !important;
    }

    .hub-nav__section {
        display: grid !important;
        min-width: 0 !important;
        width: 100% !important;
        gap: 0.35rem !important;
        flex: none !important;
        padding-bottom: 0.85rem !important;
        border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    }

    .hub-nav__section:last-child {
        border-bottom: 0 !important;
    }

    .hub-sidebar__footer {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 0.65rem !important;
        margin-top: 1rem !important;
        padding-top: 1rem !important;
    }

    .hub-workspace {
        min-height: calc(100vh - 68px) !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .hub-main,
    .seo-wrap {
        width: min(100% - 1rem, var(--hub-max)) !important;
        padding-top: 1rem !important;
    }

    .hub-card,
    .hub-library-card,
    .hub-theme-card {
        grid-column: span 12 !important;
    }

    .hub-dashboard-grid {
        flex-direction: column !important;
    }

    .hub-dashboard-column {
        width: 100% !important;
    }

    .hub-form__actions,
    .hub-card__actions,
    .seo-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hub-btn,
    .button,
    button[type="submit"] {
        width: 100%;
    }

    .hub-footer__inner {
        width: min(100% - 1rem, var(--hub-max));
        text-align: center;
    }
}

@media (max-width: 420px) {
    .hub-mobilebar__brand .site-logo__img {
        max-width: 150px !important;
        height: 34px !important;
    }

    .hub-mobilebar__toggle {
        min-width: 48px !important;
        width: 48px !important;
        padding: 0.62rem 0.75rem !important;
    }

    .hub-mobilebar__toggle-text {
        display: none !important;
    }

    .hub-sidebar.hub-mobile-menu,
    .hub-sidebar {
        width: 90vw !important;
    }
}

/* =========================================================
   FoundryPress Community Card
   ========================================================= */

.hub-community-card {
    position: relative;
    overflow: hidden;

    margin-top: 2rem;
    padding: 2.5rem;

    border-radius: 28px;

    background:
        radial-gradient(
            circle at top right,
            rgba(249,115,22,0.14),
            transparent 24rem
        ),
        linear-gradient(
            135deg,
            #1b1a28 0%,
            #0f172a 100%
        );

    border: 1px solid rgba(255,255,255,0.06);

    box-shadow:
        0 24px 60px rgba(0,0,0,0.24);
}

.hub-card-kicker {
    display: inline-block;

    margin-bottom: 0.75rem;

    color: #ff9736;

    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hub-community-card h2 {
    margin-bottom: 1rem;

    color: #ffffff;
}

.hub-community-card p {
    max-width: 680px;

    color: rgba(255,255,255,0.74);

    line-height: 1.7;
}

.hub-community-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;

    margin-top: 2rem;
}

.hub-community-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0.9rem 1.4rem;

    border-radius: 999px;

    background:
        linear-gradient(
            180deg,
            #ff9736 0%,
            #f97316 100%
        );

    color: #ffffff !important;

    font-weight: 700;
    text-decoration: none;

    box-shadow:
        0 10px 24px rgba(249,115,22,0.28);

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.hub-community-link:hover {
    transform: translateY(-1px);

    box-shadow:
        0 16px 34px rgba(249,115,22,0.34);
}

