/* =============================================================================
   Ho Store — Public theme (Obsidian Edition)
   -----------------------------------------------------------------------------
   Refined, formal, luxurious dark theme for the homepage and the customer
   portal pages. Pure obsidian background with a subtle dot grid, hairline
   borders, generous whitespace, and emerald used as a single restrained
   accent — never as a backdrop.
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Tajawal:wght@300;400;500;700;800&display=swap');

/* -----------------------------------------------------------------------------
   1. Page shell — used by every public page (Home + portal)
   -------------------------------------------------------------------------- */
body.ho-public {
    /* Token overrides for the public theme (deeper, more formal than dashboard) */
    --pub-bg:           #050608;
    --pub-bg-soft:      #0a0c12;
    --pub-surface:      rgba(255, 255, 255, 0.018);
    --pub-surface-2:    rgba(255, 255, 255, 0.030);
    --pub-hairline:     rgba(255, 255, 255, 0.060);
    --pub-hairline-2:   rgba(255, 255, 255, 0.090);
    --pub-hairline-3:   rgba(255, 255, 255, 0.140);
    --pub-text:         #f4f5f7;
    --pub-text-soft:    #b3b7c0;
    --pub-text-muted:   #6c7180;
    --pub-text-faint:   #4a4f5c;
    --pub-accent:       #614CAB;
    --pub-accent-soft:  rgba(97, 76, 171, 0.14);
    --pub-accent-line:  rgba(97, 76, 171, 0.30);

    background: var(--pub-bg);
    color: var(--pub-text);
    font-family: 'Inter', 'Tajawal', system-ui, -apple-system, "Segoe UI", sans-serif;
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.005em;
}

/* Background — fixed dot grid + a single, distant accent halo.
   Both pseudos sit at z-index -1 so they slide behind body content WITHOUT
   forcing main/section/footer into a separate stacking context (which
   would trap modals — modal at z-index 1050 inside main:z-index 1 is still
   below the navbar at z-index 1000 in the root context). */
body.ho-public::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background-color: var(--pub-bg);
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.055) 1px, transparent 0);
    background-size: 22px 22px;
}
body.ho-public::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(900px 600px at 50% -200px, rgba(97, 76, 171, 0.06), transparent 60%),
        radial-gradient(900px 700px at 50% calc(100% + 200px), rgba(97, 76, 171, 0.04), transparent 60%);
}
/* Navbar sits in the root stacking context — explicit z-index keeps it above
   page content but below the modal backdrop (1040) when a modal is open. */
.ho-public-nav { z-index: 1000; }

.ho-container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 28px;
    box-sizing: border-box;
}
.ho-container * { box-sizing: border-box; }
@media (max-width: 768px) { .ho-container { padding: 0 20px; } }

.ho-page-body { padding-top: 110px; padding-bottom: 80px; }
.ho-page-body.tight { padding-top: 96px; }

/* -----------------------------------------------------------------------------
   2. Public navbar
   -------------------------------------------------------------------------- */
.ho-public-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: 72px;
    display: flex;
    align-items: center;
    background: linear-gradient(180deg, rgba(8, 10, 14, 0.78) 0%, rgba(5, 6, 8, 0.62) 100%);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02), 0 8px 28px rgba(0, 0, 0, 0.28);
    transition: background 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}
.ho-public-nav::before {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(97, 76, 171, 0.18) 50%, transparent 100%);
    opacity: 0.5;
    pointer-events: none;
}
.ho-public-nav.is-scrolled {
    background: linear-gradient(180deg, rgba(5, 6, 8, 0.92) 0%, rgba(5, 6, 8, 0.85) 100%);
    border-bottom-color: var(--pub-hairline-2);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 12px 36px rgba(0, 0, 0, 0.45);
}
.ho-nav-inner {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    gap: 28px;
}
@media (max-width: 768px) { .ho-nav-inner { padding: 0 20px; gap: 16px; } }

.ho-nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    color: var(--pub-text);
    font-weight: 700;
    font-size: 14.5px;
    letter-spacing: 0.08em;
    flex-shrink: 0;
    text-transform: uppercase;
    transition: opacity 180ms ease;
}
.ho-nav-brand:hover { opacity: 0.85; }
.ho-nav-brand img {
    height: 32px;
    width: auto;
    opacity: 1;
    filter: drop-shadow(0 0 12px rgba(97, 76, 171, 0.22));
}
.ho-nav-brand span {
    color: var(--pub-text);
    background: linear-gradient(180deg, #ffffff 0%, #c9cdd6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ho-nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    margin-left: 16px;
}
.ho-nav-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--pub-text-soft);
    text-decoration: none;
    padding: 9px 16px;
    border-radius: 8px;
    transition: color 180ms ease, background 180ms ease, transform 180ms ease;
    white-space: nowrap;
    letter-spacing: 0.02em;
    position: relative;
}
.ho-nav-link:hover {
    color: var(--pub-text);
    background: rgba(255, 255, 255, 0.045);
}
.ho-nav-link.is-active {
    color: var(--pub-text);
    background: rgba(255, 255, 255, 0.025);
}
.ho-nav-link.is-active::after {
    content: '';
    position: absolute;
    left: 50%; bottom: 1px;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--pub-accent);
    transform: translateX(-50%);
    box-shadow: 0 0 12px rgba(97, 76, 171, 0.45);
}

.ho-nav-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-left: auto; }

.ho-nav-burger {
    display: none;
    background: transparent;
    border: 1px solid var(--pub-hairline-2);
    color: var(--pub-text);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 150ms ease;
}
.ho-nav-burger:hover { background: rgba(255, 255, 255, 0.04); }

@media (max-width: 900px) {
    .ho-nav-burger { display: inline-flex; order: 99; }
    .ho-public-nav .ho-nav-links {
        position: absolute;
        top: 70px; left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 12px 18px 18px;
        background: rgba(5, 6, 8, 0.96);
        backdrop-filter: saturate(160%) blur(16px);
        -webkit-backdrop-filter: saturate(160%) blur(16px);
        border-bottom: 1px solid var(--pub-hairline);
        transform-origin: top;
        transform: scaleY(0);
        opacity: 0;
        pointer-events: none;
        transition: opacity 180ms ease, transform 180ms ease;
    }
    .ho-public-nav.is-open .ho-nav-links {
        transform: scaleY(1); opacity: 1; pointer-events: auto;
    }
    .ho-nav-link { padding: 12px 14px; border-radius: 6px; }
    .ho-nav-link.is-active::after { display: none; }
    .ho-nav-link.is-active { background: rgba(255, 255, 255, 0.035); }
}

/* -----------------------------------------------------------------------------
   3. Avatar dropdown
   -------------------------------------------------------------------------- */
.ho-avatar-wrap { position: relative; }
.ho-avatar-trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 4px 12px 4px 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.030);
    border: 1px solid var(--pub-hairline-2);
    color: var(--pub-text);
    cursor: pointer;
    transition: border-color 150ms ease, background 150ms ease;
    font-family: inherit;
}
.ho-avatar-trigger:hover {
    border-color: var(--pub-hairline-3);
    background: rgba(255, 255, 255, 0.050);
}
.ho-avatar-trigger img {
    width: 30px; height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.ho-avatar-name {
    font-size: 13px;
    font-weight: 500;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ho-avatar-caret { font-size: 9px; opacity: 0.55; transition: transform 150ms ease; }
.ho-avatar-wrap.is-open .ho-avatar-caret { transform: rotate(180deg); }
.ho-avatar-trigger .ho-avatar-caret { display: none !important; }

.ho-avatar-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 280px;
    background-color: #0a0c12;
    background-image: linear-gradient(180deg, rgba(20, 22, 30, 0.98) 0%, rgba(10, 12, 18, 0.98) 100%);
    border: 1px solid var(--pub-hairline-2);
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
    padding: 6px;
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
    z-index: 1200;
}
.ho-avatar-wrap.is-open .ho-avatar-dropdown {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
[dir="rtl"] .ho-avatar-dropdown { right: auto; left: 0; }

.ho-dd-header { display: flex; gap: 12px; padding: 12px 12px 14px; }
.ho-dd-header img {
    width: 42px; height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px var(--pub-hairline-2);
}
.ho-dd-meta { min-width: 0; flex: 1; }
.ho-dd-name { font-size: 13px; font-weight: 600; color: var(--pub-text); margin: 0 0 2px 0; }
.ho-dd-email { font-size: 11px; color: var(--pub-text-muted); margin: 0 0 6px 0; word-break: break-all; line-height: 1.3; }
.ho-dd-role {
    display: inline-block;
    font-size: 9.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--pub-text-soft);
    text-transform: uppercase;
    letter-spacing: 0.10em;
}

.ho-dd-divider { height: 1px; background: var(--pub-hairline); margin: 4px 6px; }

.ho-dd-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--pub-text-soft);
    font-size: 13px; font-weight: 500;
    transition: background 150ms ease, color 150ms ease;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 1;
}
.ho-dd-item i { width: 16px; text-align: center; opacity: 0.85; font-size: 12px; }
.ho-dd-item:hover { background: rgba(255, 255, 255, 0.04); color: var(--pub-text); }
.ho-dd-item-accent {
    color: var(--pub-text);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: inset 0 0 0 1px var(--pub-hairline-2);
}
.ho-dd-item-accent:hover { background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px var(--pub-hairline-3); }
.ho-dd-item-accent .ho-dd-arrow { margin-left: auto; font-size: 10px; opacity: 0.7; }
[dir="rtl"] .ho-dd-item-accent .ho-dd-arrow { margin-left: 0; margin-right: auto; transform: rotate(180deg); }
.ho-dd-item-danger { color: #f87171; }
.ho-dd-item-danger:hover { background: rgba(244, 63, 94, 0.10); color: #fb7185; }

/* -----------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */
.ho-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 6px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
    white-space: nowrap;
    letter-spacing: 0.01em;
}
.ho-btn:active { transform: translateY(1px); }

.ho-btn-primary {
    background: var(--pub-text);
    color: var(--pub-bg);
    font-weight: 600;
}
.ho-btn-primary:hover {
    background: #fff;
    color: var(--pub-bg);
}

.ho-btn-secondary {
    background: transparent;
    border-color: var(--pub-hairline-2);
    color: var(--pub-text);
}
.ho-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.035);
    border-color: var(--pub-hairline-3);
    color: var(--pub-text);
}

.ho-btn-ghost {
    background: transparent;
    color: var(--pub-text-soft);
}
.ho-btn-ghost:hover { color: var(--pub-text); background: rgba(255, 255, 255, 0.03); }

.ho-btn-accent {
    background: var(--pub-accent);
    color: #ffffff;
    font-weight: 600;
}
.ho-btn-accent:hover { background: #7d6bc4; color: #ffffff; }

.ho-btn-lg { padding: 14px 28px; font-size: 14px; }

.ho-btn-block { display: flex; width: 100%; justify-content: center; }

.ho-btn > .ho-btn-leading-img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}
/* Keep download icon black / natural (no recolor) */
.ho-btn-leading-img--black { filter: none; }
/* Force white (e.g. on dark/secondary button) */
.ho-btn-leading-img--white,
.ho-modal-title-icon.ho-btn-leading-img--white {
    filter: brightness(0) invert(1);
}
.ho-modal-title-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    margin-right: 8px;
    vertical-align: -3px;
    display: inline-block;
}

/* -----------------------------------------------------------------------------
   5. Hero (homepage)
   -------------------------------------------------------------------------- */
.ho-hero {
    position: relative;
    padding: 160px 0 110px;
    text-align: center;
}

.ho-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--pub-hairline-2);
    background: rgba(255, 255, 255, 0.020);
    color: var(--pub-text-soft);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}
.ho-eyebrow .dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--pub-accent);
    box-shadow: 0 0 10px var(--pub-accent);
}

.ho-hero h1 {
    font-size: clamp(38px, 6vw, 76px);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.035em;
    margin: 28px auto 26px;
    max-width: 880px;
    color: var(--pub-text);
}
.ho-hero h1 .accent {
    font-style: italic;
    font-weight: 400;
    color: var(--pub-text-soft);
}
.ho-hero p.lede {
    font-size: clamp(15px, 1.7vw, 17px);
    line-height: 1.7;
    color: var(--pub-text-soft);
    max-width: 580px;
    margin: 0 auto 42px;
    font-weight: 400;
}
.ho-hero-ctas {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
}

/* -----------------------------------------------------------------------------
   6. Sections — formal, hairline-bound
   -------------------------------------------------------------------------- */
.ho-section {
    padding: 90px 0;
    border-top: 1px solid var(--pub-hairline);
}
.ho-section.tight { padding: 60px 0; }

.ho-section-head {
    max-width: 720px;
    margin: 0 0 56px 0;
}
.ho-section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.ho-section-eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--pub-text-muted);
    margin-bottom: 14px;
}
.ho-section-head h2 {
    font-size: clamp(28px, 3.6vw, 44px);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.10;
    margin: 0 0 18px 0;
    color: var(--pub-text);
}
.ho-section-head p {
    font-size: 15px;
    color: var(--pub-text-soft);
    line-height: 1.65;
    margin: 0;
    max-width: 560px;
}
.ho-section-head.center p { margin-left: auto; margin-right: auto; }

/* -----------------------------------------------------------------------------
   7. Pill-card grid — used by both "Why" features and "How" flow steps.
       Each card is a soft pill with a large circular icon at the top, title
       and body text centered below. Flow cards optionally render a dashed
       arrow between them via the .ho-flow-arrow connector.
   -------------------------------------------------------------------------- */
.ho-pillcard-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 22px !important;
    margin-top: 60px;
}
@media (max-width: 900px) {
    .ho-pillcard-grid { grid-template-columns: 1fr !important; gap: 22px !important; }
    .ho-flow-arrow { display: none !important; }
}

.ho-pillcard {
    position: relative !important;
    padding: 56px 28px 32px !important;
    margin-top: 36px !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.030) 0%, rgba(255, 255, 255, 0.008) 100%) !important;
    border: 1px solid var(--pub-hairline) !important;
    border-radius: 14px !important;
    text-align: center !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: border-color 220ms ease, background 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}
.ho-pillcard:hover {
    border-color: var(--pub-hairline-3) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.012) 100%) !important;
    transform: translateY(-3px);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.40), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.ho-pillcard-icon {
    position: absolute !important;
    top: -36px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 72px !important;
    height: 72px !important;
    border-radius: 18px !important;
    background: linear-gradient(180deg, #14181f 0%, #0a0c12 100%) !important;
    color: var(--pub-accent) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 26px !important;
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 0 1px var(--pub-hairline-3);
}
.ho-pillcard-icon::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 22px;
    border: 1px solid rgba(97, 76, 171, 0.18);
    pointer-events: none;
}

/* Raster icons in pill cards → brand purple #614CAB (matches --pub-accent) */
body.ho-public .ho-pillcard-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(29%) sepia(48%) saturate(1900%) hue-rotate(231deg) brightness(93%) contrast(95%);
}

.ho-pillcard-num {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--pub-accent);
    margin-bottom: 10px;
}

.ho-pillcard h3 {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--pub-text) !important;
    margin: 0 0 12px 0 !important;
    letter-spacing: -0.01em;
}

.ho-pillcard p {
    font-size: 13.5px !important;
    color: var(--pub-text-soft) !important;
    line-height: 1.7 !important;
    margin: 0 auto !important;
    max-width: 280px !important;
}

.ho-pillcard p code {
    background: rgba(255, 255, 255, 0.05);
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 12px;
    border: 1px solid var(--pub-hairline);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* Decorative dashed arrow between flow steps. Only renders on >900px screens.
   Uses an inline SVG via background — single file, no external request. */
.ho-flow-arrow {
    position: relative;
    align-self: center;
    height: 28px;
    margin-top: 50px; /* aligns with pill body, not the icon */
    pointer-events: none;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 92% 100%;
    opacity: 0.55;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 28' fill='none'><path d='M3 18 C 30 -2, 90 -2, 117 18' stroke='%23614CAB' stroke-width='1.4' stroke-linecap='round' stroke-dasharray='3 5'/><path d='M111 13 L117 18 L111 23' stroke='%23614CAB' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round' fill='none'/></svg>");
}
[dir="rtl"] .ho-flow-arrow { transform: scaleX(-1); }

/* When a row of pillcards has flow arrows interleaved, switch to a 5-column
   grid so the cards keep their sizing and arrows fit between them. */
.ho-pillcard-grid.has-flow {
    grid-template-columns: 1fr 56px 1fr 56px 1fr !important;
    gap: 6px !important;
}
@media (max-width: 900px) {
    .ho-pillcard-grid.has-flow { grid-template-columns: 1fr !important; gap: 22px !important; }
    .ho-pillcard-grid.has-flow .ho-flow-arrow { display: none !important; }
}

/* -----------------------------------------------------------------------------
   9. CTA panel
   -------------------------------------------------------------------------- */
.ho-cta {
    position: relative;
    border: 1px solid var(--pub-hairline);
    border-radius: 4px;
    overflow: hidden;
    padding: 64px 36px;
    text-align: center;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.020), rgba(255,255,255,0.005));
}
.ho-cta::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--pub-accent-line) 50%, transparent 100%);
}
.ho-cta * { position: relative; z-index: 1; }
.ho-cta h2 {
    font-size: clamp(26px, 3.2vw, 36px);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin: 0 0 14px 0;
}
.ho-cta p {
    font-size: 15px;
    color: var(--pub-text-soft);
    line-height: 1.6;
    margin: 0 auto 30px;
    max-width: 540px;
}

/* -----------------------------------------------------------------------------
   10. Footer
   -------------------------------------------------------------------------- */
.ho-footer {
    padding: 40px 0 32px;
    border-top: 1px solid var(--pub-hairline);
    margin-top: 70px;
}
.ho-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 22px;
    justify-content: space-between;
}
.ho-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--pub-text);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
}
.ho-footer-brand img { height: 26px; opacity: 0.95; }
.ho-footer-meta { font-size: 12px; color: var(--pub-text-muted); }
.ho-footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.ho-footer-links a {
    color: var(--pub-text-soft);
    text-decoration: none;
    font-size: 12.5px;
    transition: color 150ms ease;
    letter-spacing: 0.01em;
}
.ho-footer-links a:hover { color: var(--pub-text); }

/* -----------------------------------------------------------------------------
   11. Customer-portal page shell
   -------------------------------------------------------------------------- */
.ho-portal-hero {
    position: relative;
    padding: 38px 0 30px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--pub-hairline);
}
.ho-portal-hero-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}
.ho-portal-hero-icon {
    width: 52px; height: 52px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--pub-hairline-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--pub-accent);
    flex-shrink: 0;
}
.ho-portal-hero h1 {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 700;
    letter-spacing: -0.025em;
    margin: 0 0 4px 0;
    color: var(--pub-text);
    line-height: 1.15;
}
.ho-portal-hero p {
    font-size: 13.5px;
    color: var(--pub-text-soft);
    margin: 0;
    max-width: 520px;
    line-height: 1.55;
}
.ho-portal-hero .spacer { flex: 1 1 auto; min-width: 0; }

/* Sub-navbar (the only nav inside portal pages) */
.ho-portal-tabs {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--pub-hairline);
}
.ho-portal-tab {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 14px 22px;
    font-size: 13px;
    font-weight: 500;
    color: var(--pub-text-soft);
    text-decoration: none;
    transition: color 150ms ease, border-color 150ms ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    letter-spacing: 0.01em;
}
.ho-portal-tab:hover { color: var(--pub-text); }
.ho-portal-tab.is-active {
    color: var(--pub-text);
    border-bottom-color: var(--pub-accent);
}
.ho-portal-tab > i { font-size: 13px; width: 1.1em; text-align: center; opacity: 0.95; flex-shrink: 0; }
.ho-portal-tab > .ho-portal-tab-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}
/* Portal tab PNGs → --pub-accent (#614CAB), same stack as pill/tile icons */
body.ho-public .ho-portal-tab > .ho-portal-tab-icon {
    filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(30deg) brightness(104%) contrast(101%);
}
@media (max-width: 600px) {
    .ho-portal-tab { padding: 12px 14px; flex: 1 1 auto; justify-content: center; }
}

/* Tile (statistic) */
.ho-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0;
    margin-bottom: 32px;
    border: 1px solid var(--pub-hairline);
    border-radius: 4px;
    overflow: hidden;
    background: var(--pub-surface);
}
.ho-tile {
    position: relative;
    padding: 26px 28px;
    border-right: 1px solid var(--pub-hairline);
}
.ho-tile:last-child { border-right: none; }
@media (max-width: 768px) {
    .ho-tile { border-right: none; border-bottom: 1px solid var(--pub-hairline); }
    .ho-tile:last-child { border-bottom: none; }
}
.ho-tile-label {
    font-size: 10.5px;
    color: var(--pub-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 14px;
}
.ho-tile-value {
    font-size: 30px;
    font-weight: 700;
    color: var(--pub-text);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    letter-spacing: -0.02em;
}
.ho-tile-suffix {
    font-size: 12px;
    color: var(--pub-text-muted);
    margin-top: 10px;
}
.ho-tile-icon {
    position: absolute;
    top: 22px;
    right: 22px;
    width: 32px; height: 32px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--pub-hairline-2);
    color: var(--pub-text-soft);
    font-size: 13px;
}
[dir="rtl"] .ho-tile-icon { right: auto; left: 22px; }

.ho-tile-icon > .ho-tile-icon-img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    display: block;
}
/* Portal stat tiles (client + activation) — silvery gray (aligned with --pub-text-soft) */
body.ho-public .ho-tile-icon > .ho-tile-icon-img {
    filter: brightness(0) saturate(100%) invert(73%) sepia(5%) saturate(380%) hue-rotate(178deg) brightness(93%) contrast(90%);
    opacity: 0.95;
}

/* Section card */
.ho-card {
    background: var(--pub-surface);
    border: 1px solid var(--pub-hairline);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 24px;
}
.ho-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--pub-hairline);
}
.ho-card-head h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    color: var(--pub-text);
    letter-spacing: 0.01em;
    text-transform: uppercase;
}
.ho-card-head .ho-card-meta {
    font-size: 12px;
    color: var(--pub-text-muted);
    font-weight: 500;
    letter-spacing: 0.02em;
}
.ho-card-body { padding: 22px 24px; }
.ho-card-body.flush { padding: 0; }

/* Empty state */
.ho-empty {
    text-align: center;
    padding: 64px 24px;
    color: var(--pub-text-soft);
}
.ho-empty .ho-empty-ico {
    width: 60px; height: 60px;
    margin: 0 auto 22px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--pub-hairline-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--pub-text-muted);
    font-size: 22px;
}
.ho-empty h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--pub-text);
    margin: 0 0 8px 0;
    letter-spacing: -0.005em;
}
.ho-empty p { font-size: 13.5px; margin: 0; line-height: 1.6; }

/* Toast & blur reveal */
.toast-stack {
    position: fixed;
    top: 84px; right: 24px;
    z-index: 10050;
    display: flex; flex-direction: column;
    gap: 10px;
    max-width: calc(100vw - 48px);
    pointer-events: none;
}
[dir="rtl"] .toast-stack { right: auto; left: 24px; }

.blur {
    filter: blur(4px);
    transition: filter 220ms;
    cursor: pointer;
    user-select: none;
}
.blur:hover, .blur:focus, .blur.is-revealed { filter: blur(0); }

/* Disabled state for ho-btn */
.ho-btn[disabled], .ho-btn:disabled, .ho-btn.btn-disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    pointer-events: none;
    transform: none !important;
    box-shadow: none !important;
}

/* RTL */
[dir="rtl"] .ho-nav-burger { order: -1; }

/* Utility */
.ho-hidden { display: none !important; }
@media (max-width: 768px) {
    .d-md-inline { display: inline-flex !important; }
}
@media (min-width: 769px) {
    .d-md-inline-only { display: inline !important; }
    .d-mobile-only    { display: none !important; }
}

/* -----------------------------------------------------------------------------
   12. Bootstrap modal harmonisation on public pages
       The project loads Bootstrap 4 CSS but Bootstrap 3.4.1 JS, which toggles
       `.in` (BS3) instead of `.show` (BS4) on the modal element. We need to
       handle BOTH so modals actually open.
   -------------------------------------------------------------------------- */
.ho-public .modal {
    position: fixed !important;
    top: 0 !important; left: 0 !important;
    right: 0 !important; bottom: 0 !important;
    z-index: 1050 !important;
    display: none;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden;
    outline: 0;
    color: var(--pub-text);
}
.ho-public .modal.show,
.ho-public .modal.in {
    display: block !important;
    overflow-x: hidden;
    overflow-y: auto;
}
.ho-public .modal.fade .modal-dialog {
    transition: transform 220ms ease;
    transform: translate(0, -20px);
}
.ho-public .modal.show .modal-dialog,
.ho-public .modal.in .modal-dialog {
    transform: none;
    animation: ho-pub-modal-in 220ms ease both;
}
@keyframes ho-pub-modal-in {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
body.modal-open { overflow: hidden; padding-right: 0 !important; }

.ho-public .modal-backdrop,
.modal-backdrop {
    position: fixed !important;
    top: 0 !important; left: 0 !important;
    z-index: 1040 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(2, 4, 8, 0.78) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.modal-backdrop.fade { opacity: 0 !important; }
.modal-backdrop.show, .modal-backdrop.in,
.modal-backdrop.fade.show, .modal-backdrop.fade.in { opacity: 1 !important; }

.ho-public .modal-dialog {
    margin: 1.75rem auto !important;
    max-width: 540px;
    pointer-events: auto;
}
.ho-public .modal-content {
    background: #0a0c12 !important;
    border: 1px solid var(--pub-hairline-2) !important;
    border-radius: 6px !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55) !important;
    color: var(--pub-text) !important;
    overflow: hidden;
}
.ho-public .modal-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px;
    padding: 18px 22px !important;
    margin: 0 !important;
    border: none !important;
    border-bottom: 1px solid var(--pub-hairline) !important;
    background: rgba(255, 255, 255, 0.02);
}
.ho-public .modal-title {
    flex: 1 1 auto;
    margin: 0 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
    color: var(--pub-text) !important;
}
.ho-public .modal-header .close,
.ho-public .modal-header > .close,
.ho-public .modal .close {
    background: transparent !important;
    border: 1px solid var(--pub-hairline-2) !important;
    color: var(--pub-text-soft) !important;
    width: 30px; height: 30px;
    border-radius: 6px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center; justify-content: center;
    opacity: 1 !important;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    text-shadow: none !important;
}
.ho-public .modal .close:hover {
    color: var(--pub-text) !important;
    border-color: var(--pub-hairline-3) !important;
}
.ho-public .modal-body {
    padding: 22px !important;
}
.ho-public .modal-body label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--pub-text-soft);
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}
.ho-public .modal-body .form-group { margin-bottom: 16px; }
.ho-public .modal-body .form-group:last-child { margin-bottom: 0; }
.ho-public .modal-body .form-control {
    background: var(--pub-bg) !important;
    border: 1px solid var(--pub-hairline-2) !important;
    color: var(--pub-text) !important;
    border-radius: 6px !important;
    padding: 10px 12px !important;
    font-size: 13.5px !important;
    height: auto !important;
}
.ho-public .modal-body .form-control:focus {
    border-color: var(--pub-accent-line) !important;
    box-shadow: 0 0 0 3px var(--pub-accent-soft) !important;
    outline: 0 !important;
}
.ho-public .modal-body small,
.ho-public .modal-body .text-muted {
    color: var(--pub-text-muted) !important;
    font-size: 12px;
}
.ho-public .modal-footer {
    padding: 14px 22px !important;
    margin: 0 !important;
    border: none !important;
    border-top: 1px solid var(--pub-hairline) !important;
    background: rgba(255, 255, 255, 0.015);
    display: flex !important;
    justify-content: flex-end !important;
    gap: 8px;
}

/* -----------------------------------------------------------------------------
   13. Bootstrap button + badge harmonisation inside the public theme
   -------------------------------------------------------------------------- */
.ho-public .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
    line-height: 1.2;
    transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
    text-shadow: none !important;
    background-image: none !important;
}
.ho-public .btn-sm {
    padding: 7px 12px;
    font-size: 12px;
    border-radius: 5px;
}
.ho-public .btn-primary,
.ho-public .btn.btn-primary {
    background: var(--pub-text) !important;
    color: var(--pub-bg) !important;
    border-color: var(--pub-text) !important;
    font-weight: 600;
    box-shadow: none !important;
}
.ho-public .btn-primary:hover,
.ho-public .btn.btn-primary:hover {
    background: #fff !important;
    border-color: #fff !important;
    color: var(--pub-bg) !important;
}
.ho-public .btn-secondary,
.ho-public .btn.btn-secondary {
    background: transparent !important;
    border-color: var(--pub-hairline-2) !important;
    color: var(--pub-text) !important;
    box-shadow: none !important;
}
.ho-public .btn-secondary:hover,
.ho-public .btn.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: var(--pub-hairline-3) !important;
    color: var(--pub-text) !important;
}
.ho-public .btn-ghost,
.ho-public .btn.btn-ghost {
    background: transparent !important;
    border-color: transparent !important;
    color: var(--pub-text-soft) !important;
}
.ho-public .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--pub-text) !important;
}
.ho-public .btn-danger,
.ho-public .btn.btn-danger {
    background: rgba(244, 63, 94, 0.10) !important;
    border-color: rgba(244, 63, 94, 0.32) !important;
    color: #f87171 !important;
    box-shadow: none !important;
}
.ho-public .btn-danger:hover {
    background: rgba(244, 63, 94, 0.18) !important;
    color: #fb7185 !important;
}

.ho-public .eo-action-btn {
    min-width: 108px;
    justify-content: center;
    border-radius: 8px !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em;
}

.ho-public .eo-action-btn--neutral {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: var(--pub-hairline-2) !important;
    color: var(--pub-text) !important;
}

.ho-public .eo-action-btn--neutral:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: var(--pub-hairline-3) !important;
}

.ho-public .eo-action-btn--info {
    background: rgba(56, 189, 248, 0.10) !important;
    border-color: rgba(56, 189, 248, 0.34) !important;
    color: #38bdf8 !important;
}

.ho-public .eo-action-btn--info:hover {
    background: rgba(56, 189, 248, 0.18) !important;
    border-color: rgba(56, 189, 248, 0.48) !important;
    color: #7dd3fc !important;
}

.ho-public .eo-action-btn--warn {
    background: rgba(245, 158, 11, 0.10) !important;
    border-color: rgba(245, 158, 11, 0.34) !important;
    color: #fbbf24 !important;
}

.ho-public .eo-action-btn--warn:hover {
    background: rgba(245, 158, 11, 0.18) !important;
    border-color: rgba(245, 158, 11, 0.48) !important;
    color: #fcd34d !important;
}

.ho-public .eo-action-btn--danger {
    background: rgba(244, 63, 94, 0.10) !important;
    border-color: rgba(244, 63, 94, 0.32) !important;
    color: #f87171 !important;
}

.ho-public .eo-action-btn--danger:hover {
    background: rgba(244, 63, 94, 0.18) !important;
    border-color: rgba(244, 63, 94, 0.46) !important;
    color: #fb7185 !important;
}

.ho-public .eo-action-btn--gift {
    background: rgba(97, 76, 171, 0.14) !important;
    border-color: rgba(97, 76, 171, 0.34) !important;
    color: #c4b5fd !important;
}

.ho-public .eo-action-btn--gift:hover {
    background: rgba(97, 76, 171, 0.22) !important;
    border-color: rgba(97, 76, 171, 0.46) !important;
    color: #ddd6fe !important;
}

.eo-dialog {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: none;
}

.eo-dialog.is-open {
    display: block;
}

.eo-dialog__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 6, 8, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.eo-dialog__panel {
    position: relative;
    width: min(520px, calc(100vw - 32px));
    margin: 10vh auto 0;
    background: #0a0c12;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0,0,0,.75);
    overflow: hidden;
}

.eo-dialog__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.eo-dialog__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--pub-text);
}

.eo-dialog__close {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    background: transparent;
    color: var(--pub-text-soft);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.eo-dialog__body {
    padding: 22px;
    color: var(--pub-text-soft);
    line-height: 1.7;
    white-space: normal;
    word-break: break-word;
}

.eo-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 0 22px 22px;
    flex-wrap: wrap;
}
.ho-public .btn[disabled],
.ho-public .btn:disabled,
.ho-public .btn.btn-disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    pointer-events: none;
    box-shadow: none !important;
}

/* Badges (Bootstrap defaults can render bright green/red) */
.ho-public .badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid var(--pub-hairline-2);
    background: rgba(255, 255, 255, 0.03);
    color: var(--pub-text-soft);
}
.ho-public .badge.badge-dot::before {
    content: '';
    width: 5px; height: 5px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}
.ho-public .badge.badge-success {
    background: rgba(16, 185, 129, 0.10);
    border-color: rgba(16, 185, 129, 0.30);
    color: #10b981;
}
.ho-public .badge.badge-danger {
    background: rgba(244, 63, 94, 0.10);
    border-color: rgba(244, 63, 94, 0.28);
    color: #f87171;
}
.ho-public .badge.badge-warning {
    background: rgba(245, 158, 11, 0.10);
    border-color: rgba(245, 158, 11, 0.28);
    color: #fbbf24;
}

/* -----------------------------------------------------------------------------
   14. DataTables harmonisation inside .ho-public
   -------------------------------------------------------------------------- */
.ho-public .table {
    color: var(--pub-text) !important;
    font-size: 13px;
    margin: 0 !important;
}
.ho-public .table thead th {
    background: transparent !important;
    color: var(--pub-text-muted) !important;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border: none !important;
    border-bottom: 1px solid var(--pub-hairline) !important;
    padding: 14px 16px !important;
    white-space: nowrap;
}
.ho-public .table tbody td {
    background: transparent !important;
    color: var(--pub-text) !important;
    border: none !important;
    border-bottom: 1px solid var(--pub-hairline) !important;
    padding: 14px 16px !important;
    vertical-align: middle;
}
.ho-public .table tbody tr:hover td { background: rgba(255, 255, 255, 0.020) !important; }
.ho-public .table tbody tr:last-child td { border-bottom: none !important; }

.ho-public .dataTables_wrapper {
    color: var(--pub-text-soft) !important;
    padding: 0 16px;
}
.ho-public .dataTables_wrapper .dataTables_length,
.ho-public .dataTables_wrapper .dataTables_filter {
    padding: 14px 0 10px;
}
.ho-public .dataTables_wrapper .dataTables_length label,
.ho-public .dataTables_wrapper .dataTables_filter label {
    color: var(--pub-text-muted) !important;
    font-size: 12px;
    font-weight: 500;
}
.ho-public .dataTables_wrapper .dataTables_length select,
.ho-public .dataTables_wrapper .dataTables_filter input,
.ho-public .dataTables_wrapper .dataTables_filter input.InputStyle {
    background: rgba(255, 255, 255, 0.025) !important;
    background-color: rgba(255, 255, 255, 0.025) !important;
    background-image: none !important;
    border: 1px solid var(--pub-hairline-2) !important;
    color: var(--pub-text) !important;
    border-radius: 6px !important;
    padding: 7px 12px !important;
    font-size: 12.5px;
    height: auto !important;
    margin: 0 8px !important;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none !important;
    transition: border-color 150ms ease, background 150ms ease;
}
.ho-public .dataTables_wrapper .dataTables_length select {
    padding-right: 28px !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'><path d='M1 1L5 5L9 1' stroke='%23b3b7c0' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
}
.ho-public .dataTables_wrapper .dataTables_filter input,
.ho-public .dataTables_wrapper .dataTables_filter input.InputStyle {
    min-width: 220px;
}
.ho-public .dataTables_wrapper .dataTables_filter input::placeholder {
    color: var(--pub-text-muted) !important;
    opacity: 0.7;
}
.ho-public .dataTables_wrapper .dataTables_filter input:hover,
.ho-public .dataTables_wrapper .dataTables_length select:hover {
    border-color: var(--pub-hairline-3) !important;
    background: rgba(255, 255, 255, 0.04) !important;
}
.ho-public .dataTables_wrapper .dataTables_filter input:focus,
.ho-public .dataTables_wrapper .dataTables_length select:focus {
    border-color: var(--pub-accent-line) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    box-shadow: 0 0 0 3px var(--pub-accent-soft) !important;
    outline: 0;
}

.ho-public .dataTables_wrapper .dataTables_paginate {
    padding: 14px 0;
    display: flex;
    justify-content: flex-end;
    gap: 4px;
}
.ho-public .dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 6px 12px !important;
    margin: 0 !important;
    border: 1px solid var(--pub-hairline-2) !important;
    border-radius: 6px !important;
    background: transparent !important;
    color: var(--pub-text-soft) !important;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.ho-public .dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.disabled) {
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--pub-text) !important;
    border-color: var(--pub-hairline-3) !important;
}
.ho-public .dataTables_wrapper .dataTables_paginate .paginate_button.current,
.ho-public .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--pub-text) !important;
    color: var(--pub-bg) !important;
    border-color: var(--pub-text) !important;
}
.ho-public .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.ho-public .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    color: var(--pub-text-faint) !important;
    cursor: not-allowed;
    opacity: 0.5;
    background: transparent !important;
    border-color: var(--pub-hairline) !important;
}
.ho-public .dataTables_wrapper .dataTables_info {
    padding: 14px 0;
    color: var(--pub-text-muted) !important;
    font-size: 12px;
}
.ho-public .text-muted { color: var(--pub-text-muted) !important; }
.ho-public .text-right { text-align: right; }

/* Avatar dropdown safety: ensure click-throughability when open */
.ho-public .ho-avatar-dropdown { z-index: 1100; }
.ho-public-nav { z-index: 1000 !important; }

/* =============================================================================
   15. Comprehensive responsive layer
       Handles tablets (≤900px) and phones (≤600px / ≤480px). The headline goal
       is real device parity: tables collapse into stacked cards on small
       screens, the portal hero re-flows, modals fill the viewport, navbar
       drawer is touch-friendly, and every interactive target is ≥40px tall.
   ============================================================================= */

/* Tablet & below */
@media (max-width: 900px) {
    .ho-page-body { padding-top: 96px; padding-bottom: 56px; }

    /* Hero compresses */
    .ho-hero { padding: 110px 0 70px; }
    .ho-hero h1 { margin: 22px auto 18px; }
    .ho-hero p.lede { margin: 0 auto 28px; }
    .ho-hero-ctas {
        display: flex !important;
        flex-direction: column;
        width: 100%;
        max-width: 380px;
        margin: 0 auto;
        align-items: stretch;
    }
    .ho-hero-ctas .ho-btn { width: 100%; justify-content: center; }

    /* Sections */
    .ho-section { padding: 60px 0; }
    .ho-section-head { margin-bottom: 38px; }

    /* Portal hero re-flows */
    .ho-portal-hero-inner { gap: 14px; }
    .ho-portal-hero-inner > div:not(.ho-portal-hero-icon):not(.spacer) { flex: 1 1 auto; min-width: 0; }
    .ho-portal-hero .ho-btn { width: 100%; justify-content: center; }
    .ho-portal-hero .spacer { display: none; }

    /* Tile grid → 2 cols */
    .ho-tile-grid { grid-template-columns: repeat(2, 1fr); }
    .ho-tile { border-right: 1px solid var(--pub-hairline) !important; border-bottom: 1px solid var(--pub-hairline); }
    .ho-tile:nth-child(even) { border-right: none !important; }

    /* CTA */
    .ho-cta { padding: 44px 24px; }

    /* Footer wraps */
    .ho-footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* Phones */
@media (max-width: 600px) {
    body.ho-public { overflow-x: hidden; }
    .ho-container { padding: 0 16px; max-width: 100vw; }
    .ho-nav-inner { padding: 0 14px; gap: 8px; }

    /* Brand: hide wordmark, keep logo */
    .ho-nav-brand span { display: none; }
    .ho-nav-brand img { height: 28px; }

    /* Sign In in navbar shrinks to icon only on phones */
    .ho-nav-actions .ho-btn-primary {
        padding: 9px 12px !important;
        font-size: 12px !important;
        min-height: 38px;
    }
    .ho-nav-actions .ho-btn-primary span { display: none; }
    .ho-nav-actions .ho-btn-primary i { margin: 0; font-size: 14px; }

    /* Burger button */
    .ho-nav-burger { padding: 7px 11px; }

    /* Hero */
    .ho-hero { padding: 96px 0 56px; }
    .ho-hero .ho-container { max-width: 100%; }
    .ho-eyebrow { font-size: 10px; padding: 5px 12px; }
    .ho-hero h1 {
        font-size: clamp(28px, 8vw, 40px);
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    .ho-hero p.lede { font-size: 14px; }

    /* Sections — keep headings fully inside the viewport */
    .ho-section { padding: 48px 0; }
    .ho-section-head {
        max-width: 100%;
        padding: 0 4px;
    }
    .ho-section-head h2 {
        font-size: clamp(22px, 6vw, 30px);
        line-height: 1.18;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    .ho-section-head p { font-size: 13.5px; }

    /* Tiles → 1 col */
    .ho-tile-grid { grid-template-columns: 1fr; }
    .ho-tile { border-right: none !important; border-bottom: 1px solid var(--pub-hairline); }
    .ho-tile:last-child { border-bottom: none; }
    .ho-tile { padding: 22px 22px; }
    .ho-tile-value { font-size: 26px; }

    /* Portal hero compact */
    .ho-portal-hero { padding: 28px 0 22px; margin-bottom: 22px; }
    .ho-portal-hero-icon { width: 44px; height: 44px; font-size: 16px; }
    .ho-portal-hero h1 { font-size: 22px; }
    .ho-portal-hero p { font-size: 12.5px; }

    /* Portal tabs become scrollable horizontal */
    .ho-portal-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .ho-portal-tabs::-webkit-scrollbar { display: none; }
    .ho-portal-tab { white-space: nowrap; padding: 12px 16px; flex: 0 0 auto; }

    /* Card head wraps */
    .ho-card-head { padding: 14px 18px; }
    .ho-card-head h3 { font-size: 13px; }
    .ho-card-body { padding: 18px; }

    /* Buttons fill width inside card actions */
    .ho-empty .ho-btn { width: 100%; justify-content: center; }

    /* CTA */
    .ho-cta { padding: 36px 18px; }
    .ho-cta h2 { font-size: 22px; }
    .ho-cta p { font-size: 14px; }
    .ho-cta .ho-hero-ctas { width: 100%; }

    /* Footer */
    .ho-footer { padding: 28px 0 24px; margin-top: 48px; }
}

/* Tiny phones */
@media (max-width: 380px) {
    .ho-container { padding: 0 14px; }
    .ho-portal-tab { padding: 11px 12px; font-size: 12px; }
}

/* =============================================================================
   16. Responsive tables → card layout on small screens
       Whenever a .table inside .ho-public is rendered below 760px, each row
       collapses into a stacked card. We use [data-label] attributes when
       provided; otherwise the cell shows without a label. Action cells get
       full-width styling so buttons stay reachable.
   ============================================================================= */
@media (max-width: 760px) {
    .ho-public .table-responsive {
        border: none;
        overflow: visible;
    }
    .ho-public .table {
        display: block;
        width: 100% !important;
        background: transparent !important;
    }
    .ho-public .table thead {
        position: absolute !important;
        width: 1px; height: 1px;
        margin: -1px; padding: 0;
        overflow: hidden; clip: rect(0,0,0,0);
        white-space: nowrap; border: 0;
    }
    .ho-public .table tbody { display: block; width: 100%; }
    .ho-public .table tbody tr {
        display: block;
        background: var(--pub-surface) !important;
        border: 1px solid var(--pub-hairline) !important;
        border-radius: 10px;
        margin-bottom: 12px;
        padding: 14px 16px;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    }
    .ho-public .table tbody tr:hover td { background: transparent !important; }
    .ho-public .table tbody tr:last-child td { border-bottom: 1px dashed var(--pub-hairline) !important; }
    .ho-public .table tbody td {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 10px 0 !important;
        border: none !important;
        border-bottom: 1px dashed var(--pub-hairline) !important;
        text-align: right !important;
        white-space: normal !important;
        font-size: 13px;
    }
    .ho-public .table tbody td:last-child { border-bottom: none !important; }
    .ho-public .table tbody td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        font-size: 10.5px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.10em;
        color: var(--pub-text-muted);
        text-align: left;
        margin-right: 12px;
    }
    /* Action cells span the full row width */
    .ho-public .table tbody td.text-right,
    .ho-public .table tbody td.actions-cell {
        flex-direction: column !important;
        align-items: stretch !important;
        text-align: left !important;
    }
    .ho-public .table tbody td.text-right > div,
    .ho-public .table tbody td.text-right form {
        width: 100% !important;
        display: flex !important;
        gap: 8px !important;
        flex-wrap: wrap !important;
        justify-content: stretch !important;
    }
    .ho-public .table tbody td .btn,
    .ho-public .table tbody td .ho-btn {
        flex: 1 1 auto;
        justify-content: center;
    }
    .ho-public .table tbody td .blur {
        max-width: 60%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* DataTables wrapper compact */
    .ho-public .dataTables_wrapper { padding: 0 4px; }
    .ho-public .dataTables_wrapper .dataTables_filter input,
    .ho-public .dataTables_wrapper .dataTables_filter input.InputStyle { min-width: 0 !important; width: 100% !important; }
    .ho-public .dataTables_wrapper .dataTables_filter { padding: 12px 0; }
    .ho-public .dataTables_wrapper .dataTables_filter label { display: block; width: 100%; }
    .ho-public .dataTables_wrapper .dataTables_paginate { justify-content: center; flex-wrap: wrap; }
}

/* Prevent duplicate DataTables controls when the HTML already contains a pre-rendered
   wrapper (e.g. saved page includes #myTable_wrapper and DataTables builds another).
   Hide the original blocks once DataTables has initialized. */
.ho-public .dataTables_wrapper:not(.dt-container) #myTable_filter,
.ho-public .dataTables_wrapper:not(.dt-container) #myTable_paginate,
.ho-public .dataTables_wrapper:not(.dt-container) #myTable_info,
.ho-public .dataTables_wrapper:not(.dt-container) #myTable_length {
    display: none !important;
}

/* =============================================================================
   17. Modal mobile layer — fill the viewport, keep dialog reachable
   ============================================================================= */
@media (max-width: 600px) {
    .ho-public .modal-dialog,
    .modal-dialog {
        margin: 0 !important;
        max-width: 100% !important;
        min-height: 100vh;
        display: flex;
        align-items: flex-end;
    }
    .ho-public .modal-content,
    .modal-content {
        border-radius: 14px 14px 0 0 !important;
        width: 100%;
        max-height: 92vh;
        overflow: auto;
    }
    .ho-public .modal-header { padding: 16px 18px !important; }
    .ho-public .modal-body { padding: 18px !important; }
    .ho-public .modal-footer {
        padding: 12px 18px !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    .ho-public .modal-footer .btn,
    .ho-public .modal-footer .ho-btn { flex: 1 1 auto; justify-content: center; }
}

/* =============================================================================
   18. Touch-target safety — every interactive element ≥ 40px tall on small
   ============================================================================= */
@media (max-width: 600px) {
    .ho-public .btn,
    .ho-public .ho-btn { min-height: 40px; }
    .ho-public .btn-sm { min-height: 36px; padding: 8px 12px !important; }
    .ho-nav-burger { min-height: 40px; min-width: 40px; }
    .ho-avatar-trigger { min-height: 40px; }
    .ho-avatar-trigger .ho-avatar-name { display: none !important; }
    .ho-portal-tab { min-height: 44px; }
}

/* Brand accent for Font Awesome icons (replaces legacy emerald) */
body.ho-public .ho-nav-link > i,
body.ho-public .ho-nav-link > .fab,
body.ho-public .ho-footer-links a > i,
body.ho-public .ho-footer-links a > .fab,
body.ho-public .ho-hero-ctas .ho-btn > i,
body.ho-public .ho-hero-ctas .ho-btn > .fab,
body.ho-public .ho-cta .ho-btn > i,
body.ho-public .ho-cta .ho-btn > .fab,
body.ho-public .ho-dd-item > i,
body.ho-public .ho-portal-tab > i {
    color: #ffffff;
}

body.ho-public .ho-tile-icon > i,
body.ho-public .ho-portal-hero-icon > i {
    color: var(--pub-text-soft);
}

body.ho-public .ho-portal-hero-icon > .ho-portal-tab-icon {
    filter: brightness(0) saturate(100%) invert(29%) sepia(48%) saturate(1900%) hue-rotate(231deg) brightness(93%) contrast(95%);
}

body.ho-public .ho-btn-primary > i,
body.ho-public .ho-btn-primary > .fab,
body.ho-public .ho-nav-actions .ho-btn-primary i,
body.ho-public .ho-nav-actions .ho-btn-primary .fab {
    color: inherit !important;
}
