/* ===== App shell: minimal navbar + left/right sidebars =====
   Used on "app-like" pages (chat, directory) instead of the full marketing
   navbar - see frontend/website/includes/app-navbar.html,
   app-sidebar-left.html, app-sidebar-right.html. Marketing pages (home,
   services, pricing, about, contact) keep the original full-width navbar.html
   and are untouched by anything in this file. */

:root {
    --app-sidebar-w: 260px;
    --app-sidebar-right-w: 280px;
}

/* ---- Navbar ----
   Full-width, not the generic centered .container. The navbar is its own
   row above the sidebars (not beside them), so its content just uses a
   normal edge gutter - it doesn't reserve sidebar-width space the way
   body/main-content does below it (that previously left a large empty gap
   at the start/end of the bar itself, which is what this was changed to
   remove). */
.app-navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 100%;
    padding: 0 24px;
}

.app-navbar-start {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 0;
}

.app-navbar-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-2, #f4f6fb);
    border-radius: 999px;
    padding: 8px 16px;
    max-width: 240px;
    width: 100%;
    color: var(--text-muted, #64748b);
}

.app-navbar-search input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.88rem;
    width: 100%;
    color: var(--text, #0f172a);
}

.app-navbar-end {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-shrink: 0;
}

@media (max-width: 860px) {
    .app-navbar-search { display: none; }
}

/* Login/Register: navbar's copy on desktop, the mobile drawer
   (app-sidebar-left)'s copy below that breakpoint - .auth-buttons'
   inline display (toggled by main.js based on auth state) stays in sync on
   both, this just decides which one is actually on screen. */
@media (max-width: 991px) {
    .app-navbar-end .auth-buttons { display: none !important; }
}

@media (min-width: 992px) {
    .app-sidebar-auth { display: none !important; }
}

.app-sidebar-auth {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin: 4px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--border-2, #e5e9f2);
}

.app-sidebar-auth .btn-nav-login,
.app-sidebar-auth .btn-nav-primary {
    text-align: center;
    width: 100%;
}

/* Slot navbar-shared.js relocates .user-profile into below 992px (see
   app-sidebar-left.html) - same divider treatment as .app-sidebar-auth
   above (they're mutually exclusive: guests see that, logged-in users see
   this), sitting between the nav links and the language/currency
   switchers. */
#sidebarUserProfileSlot:not(:empty) {
    margin: 4px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--border-2, #e5e9f2);
}

#sidebarUserProfileSlot .user-profile { display: flex; }

/* The account dropdown's generic min-width: 400px (main.css) doesn't fit
   the ~260px-wide sidebar - it silently overflowed the sidebar's fixed box
   with no horizontal scroll affordance, so opening it looked like nothing
   happened. Anchor it to the trigger's own end edge instead of the
   navbar's `right: 0` (which also assumed a wide navbar-relative
   ancestor) and cap its width to the sidebar's available inner space. */
#sidebarUserProfileSlot .dropdown-menu {
    position: static;
    margin-top: 8px;
    inset-inline-end: auto;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 6px;
}

/* --- Sidebar account dropdown: compact rows, consistent icons/avatars --- */
#sidebarUserProfileSlot .user-info {
    width: 100%;
    justify-content: flex-start;
    padding: 8px 12px !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, rgba(79, 70, 229, .06), rgba(124, 58, 237, .03)) !important;
    border-color: var(--sh-line) !important;
}
#sidebarUserProfileSlot .user-info .user-avatar {
    width: 40px !important;
    height: 40px !important;
}
#sidebarUserProfileSlot .user-info .user-name {
    font-size: .95rem !important;
    max-width: none !important;
    flex: 1;
}
#sidebarUserProfileSlot .user-info .dropdown-arrow { display: none; }

#sidebarUserProfileSlot .dropdown-menu a,
#sidebarUserProfileSlot .dropdown-menu .dropdown-item-verify {
    padding: 10px 12px !important;
    font-size: .88rem;
    border-radius: 10px !important;
}

/* Companies in sidebar — compact rows with square 36px avatars */
#sidebarUserProfileSlot .company-group-label {
    padding: 10px 10px 4px !important;
    font-size: .7rem !important;
    font-weight: 800 !important;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--sh-soft) !important;
}
#sidebarUserProfileSlot .company-link {
    display: block;
    padding: 2px 0 !important;
    text-decoration: none;
}
#sidebarUserProfileSlot .company-link:hover { background: transparent !important; }
#sidebarUserProfileSlot .company-item-inner {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 7px 10px !important;
    border-radius: 12px !important;
    border: 1px solid var(--sh-line) !important;
    background: #fff !important;
    transition: background .15s, border-color .15s !important;
}
#sidebarUserProfileSlot .company-link:hover .company-item-inner {
    background: var(--sh-bg) !important;
    border-color: var(--sh-brand) !important;
    box-shadow: none !important;
}
#sidebarUserProfileSlot .company-logo-sm,
#sidebarUserProfileSlot .company-initial {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    border-radius: 9px !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
}
#sidebarUserProfileSlot .profile-link .company-logo-sm { border-radius: 50% !important; }
#sidebarUserProfileSlot .company-item-text {
    flex: 1;
    min-width: 0;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1px !important;
}
#sidebarUserProfileSlot .company-item-name {
    font-size: .86rem !important;
    font-weight: 700 !important;
    color: var(--sh-text) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
#sidebarUserProfileSlot .company-item-role {
    font-size: .72rem !important;
    font-weight: 600 !important;
    color: var(--sh-muted) !important;
}
#sidebarUserProfileSlot .dropdown-divider {
    height: 1px;
    margin: 6px 4px;
    background: var(--sh-line);
}

/* The personalized card at the top of the sidebar (#shs-for-you) already
   shows the user's profile row, companies and logout - the duplicate avatar
   + dropdown that navbar-shared.js moves into #sidebarUserProfileSlot on
   mobile is redundant. Hide it on mobile. */
@media (max-width: 991px) {
    #sidebarUserProfileSlot { display: none !important; }
}

/* ---- Sidebars (desktop) ---- */
@media (min-width: 992px) {
    body.has-app-sidebar {
        padding-left: var(--app-sidebar-w);
    }

    body.has-app-sidebar-right {
        padding-right: var(--app-sidebar-right-w);
    }

    .app-sidebar-left {
        position: fixed;
        top: var(--navbar-h);
        left: 0;
        bottom: 0;
        width: var(--app-sidebar-w);
        overflow-y: auto;
        background: var(--card, #ffffff);
        padding: 20px 14px;
        z-index: 60;
    }


    .app-sidebar-right {
        position: fixed;
        top: var(--navbar-h);
        right: 0;
        bottom: 0;
        width: var(--app-sidebar-right-w);
        overflow-y: auto;
        background: var(--card, #ffffff);
        padding: 20px 16px;
        z-index: 60;
    }

    [dir="rtl"] .app-sidebar-left { left: auto; right: 0; }
    [dir="rtl"] .app-sidebar-right { right: auto; left: 0; }
    [dir="rtl"] body.has-app-sidebar { padding-left: 0; padding-right: var(--app-sidebar-w); }
    [dir="rtl"] body.has-app-sidebar-right { padding-right: 0; padding-left: var(--app-sidebar-right-w); }

    /* Same fix as the navbar's combined-selector above, same reason: with
       both classes on <body> (directory page), the two single-class rules
       above fight over the same two properties and whichever comes second
       in the stylesheet wins for BOTH - resetting the other side back to 0
       and leaving body with no room reserved for that sidebar at all
       (its content sat underneath the sidebar/off past the viewport edge
       instead of the page shifting to make room). */
    [dir="rtl"] body.has-app-sidebar.has-app-sidebar-right {
        padding-left: var(--app-sidebar-right-w);
        padding-right: var(--app-sidebar-w);
    }
}

.app-sidebar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.app-sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text, #1e293b);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.app-sidebar-link svg { flex-shrink: 0; opacity: 0.75; }

.app-sidebar-link:hover {
    background: var(--bg-2, #f4f6fb);
}

.app-sidebar-link.nav-active {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.app-sidebar-link.nav-active svg { opacity: 1; }

.app-sidebar-divider {
    height: 1px;
    margin: 10px 12px;
    background: var(--border-2, #e5e9f2);
}

/* ---- Right sidebar: featured feed (random mix of firms/consultants,
   later also constitution articles/quotes) - each `kind` gets its own
   card look instead of one shared list style, per user request. ---- */
.app-sidebar-right-title {
    font-size: 0.85rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--text-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.app-feed {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.app-feed-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border-2, #e5e9f2);
    background: var(--card, #ffffff);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.app-feed-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.app-feed-card-cover {
    flex-shrink: 0;
    object-fit: cover;
}

.app-feed-card-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
}

.app-feed-card-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.app-feed-card-kind {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    width: fit-content;
    padding: 1px 7px;
    border-radius: 999px;
}

.app-feed-card-name {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.87rem;
    font-weight: 700;
    color: var(--text, #1e293b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-feed-verified { flex-shrink: 0; }

.app-feed-card-meta {
    font-size: 0.75rem;
    color: var(--text-muted, #64748b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Lawyer/consultant card - circular avatar, blue accent (any consultant
   type - lawyer, psychologist, financial, ...; role_display distinguishes
   them, not a fixed color per type). */
.app-feed-card--lawyer .app-feed-card-cover {
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.app-feed-card--lawyer .app-feed-card-initials { background: #2563eb; }

.app-feed-card--lawyer .app-feed-card-kind {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

/* Firm card - banner layout: a solid amber accent bar down the start edge
   and the name promoted above the kind badge (reversed from the consultant
   card's order), plus a pill-shaped location tag instead of plain text - a
   structural difference from the consultant row, not just a recolor. */
.app-feed-card--company {
    border-inline-start: 3px solid #d97706;
    background: linear-gradient(0deg, rgba(217, 119, 6, 0.04), rgba(217, 119, 6, 0.04)), var(--card, #ffffff);
}

.app-feed-card--company .app-feed-card-cover {
    width: 48px;
    height: 48px;
    border-radius: 12px;
}

.app-feed-card--company .app-feed-card-initials { background: #d97706; border-radius: 12px; }

.app-feed-card--company .app-feed-card-body { gap: 3px; }

.app-feed-card--company .app-feed-card-kind {
    background: rgba(217, 119, 6, 0.12);
    color: #b45309;
}

.app-feed-card--company .app-feed-card-meta {
    display: inline-block;
    width: fit-content;
    background: rgba(217, 119, 6, 0.08);
    padding: 1px 8px;
    border-radius: 999px;
}

/* Constitution article card - book icon tile, green accent so it reads as a
   third distinct "type" alongside consultants/firms. Its excerpt is longer
   than a name/location line, so it wraps (clamped to 2 lines) instead of
   the single-line ellipsis the other card kinds use. */
.app-feed-card--article {
    align-items: flex-start;
    background: linear-gradient(0deg, rgba(5, 150, 105, 0.04), rgba(5, 150, 105, 0.04)), var(--card, #ffffff);
}

.app-feed-card--article .app-feed-card-cover--article {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 150, 105, 0.12);
    color: #059669;
}

.app-feed-card--article .app-feed-card-kind {
    background: rgba(5, 150, 105, 0.12);
    color: #059669;
}

.app-feed-card--article .app-feed-card-name {
    white-space: normal;
}

.app-feed-card--article .app-feed-card-meta {
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

/* Blog-post card - a fully vertical, image-forward layout (full-width
   cover on top, text below) instead of the horizontal avatar-row every
   other card kind uses - the structural shape alone (not just its violet
   accent) marks it as a distinct "type" at a glance. */
.app-feed-card--post {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    overflow: hidden;
    background: var(--card, #ffffff);
}

.app-feed-card-cover--post-image {
    width: 100%;
    height: 100px;
    border-radius: 0;
    object-fit: cover;
}

.app-feed-card-cover--post {
    width: 100%;
    height: 72px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(124, 58, 237, 0.12);
    color: #7c3aed;
}

.app-feed-card--post .app-feed-card-body {
    padding: 10px 12px 12px;
}

.app-feed-card--post .app-feed-card-kind {
    background: rgba(124, 58, 237, 0.12);
    color: #7c3aed;
}

.app-feed-card--post .app-feed-card-name {
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
}

.app-feed-empty {
    font-size: 0.82rem;
    color: var(--text-muted, #64748b);
    padding: 8px 0;
    margin: 0;
}

/* ---- Sidebar: language/currency switchers (bottom) ---- */
.app-sidebar-switchers {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-2, #e5e9f2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

/* The generic .dropdown-menu rule (main.css) is sized for the wide
   account/notification menus (min-width: 400px) - inside a ~260px sidebar
   that overflows to a scroll panel (which forces overflow-x: auto too),
   that 400px panel got clipped by the sidebar's own edge and its text was
   never visible. Override with a width that actually fits. */
.app-sidebar-switchers #currency-switcher {
    min-width: 150px;
    width: max-content;
    max-width: calc(var(--app-sidebar-w) - 40px);
    right: 0;
    left: auto;
}

[dir="rtl"] .app-sidebar-switchers #currency-switcher {
    right: auto;
    left: 0;
}

/* ---- Mobile: sidebars become a toggled drawer ---- */
@media (max-width: 991px) {
    .app-sidebar-right { display: none; }

    .app-sidebar-left {
        position: fixed;
        top: var(--navbar-h);
        left: 0;
        bottom: 0;
        width: 260px;
        background: var(--card, #fff);
        padding: 20px 14px;
        overflow-y: auto;
        z-index: 200;
        transform: translateX(-105%);
        transition: transform 0.25s ease;
        box-shadow: 0 0 30px rgba(0,0,0,0.15);
    }

    [dir="rtl"] .app-sidebar-left { left: auto; right: 0; transform: translateX(105%); }

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

    .app-sidebar-toggle {
        display: flex !important;
    }
}

@media (min-width: 992px) {
    .app-sidebar-toggle { display: none !important; }
}

/* ==========================================================================
   Shell v3 - rebuilt navbar + both sidebars (markup in includes/app-navbar,
   app-sidebar-left, app-sidebar-right). Layout rules above (fixed sidebars,
   body padding, RTL swaps, drawer, relocated account chip) are unchanged;
   everything below is presentation for the new structure.
   ========================================================================== */
:root {
    --sh-ink: #0a0f1f;
    --sh-brand: #4f46e5;
    --sh-brand-2: #7c3aed;
    --sh-gold: #d4a73a;
    --sh-gold-2: #f1d27a;
    --sh-bg: #f6f8ff;
    --sh-line: #e3e8f6;
    --sh-text: #0f1628;
    --sh-muted: #5b6585;
    --sh-soft: #8b94b5;
}

/* ---------- top bar ---------- */
.navbar.app-navbar {
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--sh-line);
}
.app-navbar .shn {
    display: grid;
    grid-template-columns: 1fr minmax(240px, 560px) 1fr;
    align-items: center;
    gap: 16px;
    height: 100%;
    padding: 0 20px;
}
.app-navbar .shn-start { display: flex; align-items: center; gap: 12px; flex: initial; min-width: 0; justify-self: start; }
.app-navbar .shn-end { display: flex; align-items: center; gap: 10px; justify-self: end; flex-shrink: 0; }
.app-navbar .shn-logo .logo-img { width: 112px; height: auto; display: block; }

.app-navbar .app-sidebar-toggle {
    width: 42px; height: 42px;
    border: 0; border-radius: 13px;
    background: var(--sh-bg);
    flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    cursor: pointer;
}
.app-navbar .app-sidebar-toggle span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--sh-text); transition: transform .2s, opacity .2s; }
.app-navbar .app-sidebar-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.app-navbar .app-sidebar-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.app-navbar .app-sidebar-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* search */
.app-navbar .shn-search {
    display: flex; align-items: center; gap: 10px;
    width: 100%; max-width: none;
    height: 44px; padding: 0 12px 0 16px;
    border-radius: 14px;
    background: var(--sh-bg);
    border: 1.5px solid transparent;
    color: var(--sh-muted);
    transition: background-color .2s, border-color .2s, box-shadow .2s;
}
[dir="rtl"] .app-navbar .shn-search { padding: 0 16px 0 12px; }
.app-navbar .shn-search:hover { background: #eef1fb; }
.app-navbar .shn-search:focus-within { background: #fff; border-color: var(--sh-brand); box-shadow: 0 0 0 4px rgba(79, 70, 229, .12); }
.app-navbar .shn-search svg { flex-shrink: 0; }
.app-navbar .shn-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 500 .92rem/1 inherit; font-family: inherit; color: var(--sh-text); -webkit-appearance: none; appearance: none; }
.app-navbar .shn-search input::placeholder { color: var(--sh-soft); }
.app-navbar .shn-search input::-webkit-search-cancel-button { display: none; }
.shn-kbd { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--sh-line); background: #fff; color: var(--sh-soft); font: 700 .75rem/1 monospace; }
.app-navbar .shn-search:focus-within .shn-kbd { display: none; }

/* icon buttons */
.app-navbar .shn-icons { display: flex; align-items: center; gap: 8px; padding: 0; border: 0; }
.app-navbar .chat-icon-btn.shn-icon {
    width: 44px; height: 44px; border-radius: 14px;
    background: var(--sh-bg); color: var(--sh-text);
    border: 1px solid transparent;
    transition: background-color .2s, color .2s, box-shadow .2s, transform .2s;
}
.app-navbar .chat-icon-btn.shn-icon:hover {
    background: linear-gradient(135deg, var(--sh-brand), var(--sh-brand-2));
    color: #fff;
    box-shadow: 0 10px 22px -8px rgba(79, 70, 229, .55);
    transform: translateY(-1px);
}
.app-navbar .chat-badge {
    top: -5px; inset-inline-end: -5px;
    min-width: 19px; height: 19px;
    font-size: .66rem; font-weight: 800;
    background: #ef4444; border: 2px solid #fff;
    box-shadow: 0 4px 10px -2px rgba(239, 68, 68, .5);
}
.app-navbar .user-profile, .app-navbar .shn-auth { padding-inline-start: 12px; border-inline-start: 1px solid var(--sh-line); }

/* account chip (also shown inside the drawer on mobile) */
.user-profile .user-info {
    padding: 4px 12px 4px 4px; gap: 9px;
    border: 1.5px solid var(--sh-line); border-radius: 999px; background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
[dir="rtl"] .user-profile .user-info { padding: 4px 4px 4px 12px; }
.user-profile .user-info:hover { border-color: #b9b4f7; background: #fff; box-shadow: 0 8px 18px -10px rgba(79, 70, 229, .45); }
.user-profile .user-avatar {
    width: 28px; height: 28px; border: 2px solid transparent; border-radius: 50%; object-fit: cover;
    background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, var(--sh-brand), var(--sh-brand-2)) border-box;
}
.user-profile .user-name { font-size: .88rem; font-weight: 700; color: var(--sh-text); max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-profile .dropdown-arrow { color: var(--sh-soft); }

/* dropdowns */
.app-navbar .dropdown-menu, .shs .dropdown-menu {
    border: 1px solid var(--sh-line);
    border-radius: 18px;
    padding: 8px;
    background: #fff;
    box-shadow: 0 28px 56px -18px rgba(15, 22, 40, .32), 0 4px 12px rgba(15, 22, 40, .05);
}
.app-navbar .account-dropdown-menu, .shs .account-dropdown-menu { min-width: 220px; }
.app-navbar .dropdown-menu a, .shs .dropdown-menu a {
    padding: .7rem .95rem; border-radius: 11px; font-weight: 600; color: var(--sh-text);
}
/* Account-menu rows (profile/company/logout) have their own compact
   sizing - never let the generic dropdown-link padding or font override it. */
.app-navbar .account-dropdown-menu .account-item,
.shs .account-dropdown-menu .account-item,
#shs-company-card .account-item,
.app-navbar .account-dropdown-menu a.account-item,
.shs .account-dropdown-menu a.account-item {
    padding: 5px 8px !important;
    font-weight: 600 !important;
    font-size: .8rem !important;
    border-radius: 8px !important;
}
.app-navbar .account-dropdown-menu .account-item-logo,
.shs .account-dropdown-menu .account-item-logo {
    width: 24px !important; height: 24px !important;
    min-width: 24px !important; max-width: 24px !important; max-height: 24px !important;
    flex: 0 0 24px !important;
}
.app-navbar .dropdown-menu a:hover, .shs .dropdown-menu a:hover { background: var(--sh-bg); color: var(--sh-brand); }
.app-navbar .dropdown-menu .logout-btn, .shs .dropdown-menu .logout-btn { color: #dc2626; }
.app-navbar .dropdown-menu .logout-btn:hover, .shs .dropdown-menu .logout-btn:hover { background: rgba(239, 68, 68, .08); color: #dc2626; }
.app-navbar .dropdown-menu.notif-dropdown-menu { padding: 0; overflow: hidden; border-radius: 20px; }
.app-navbar .notif-dropdown-header { padding: 14px 18px; background: var(--sh-bg); border-bottom: 1px solid var(--sh-line); font-weight: 800; color: var(--sh-text); }
.app-navbar .notif-mark-all-btn { color: var(--sh-brand); font-weight: 800; border-radius: 999px; padding: 4px 10px; }
.app-navbar .notif-mark-all-btn:hover { background: rgba(79, 70, 229, .08); }
.app-navbar .notif-item { border-bottom: 1px solid var(--sh-line); }
.app-navbar .notif-item:hover { background: var(--sh-bg); }
.app-navbar .notif-item.unread { background: rgba(79, 70, 229, .045); }
.app-navbar .notif-item-title { font-weight: 800; color: var(--sh-text); }
.app-navbar .notif-item-time { color: var(--sh-soft); }

/* guest buttons (navbar + drawer) */
.btn-nav-login { padding: .6rem 1rem; border-radius: 999px; font-weight: 700; color: var(--sh-text); }
.btn-nav-login:hover { background: var(--sh-bg); color: var(--sh-brand); }
.btn-nav-primary {
    padding: .65rem 1.35rem; border: 0; border-radius: 999px;
    font-weight: 800; color: #fff;
    background: linear-gradient(135deg, var(--sh-brand), var(--sh-brand-2));
    box-shadow: 0 10px 22px -10px rgba(79, 70, 229, .65);
    transition: transform .2s, box-shadow .2s;
}
.btn-nav-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -10px rgba(79, 70, 229, .75); }

@media (max-width: 991px) {
    .app-navbar .shn { grid-template-columns: auto 1fr auto; }
    .app-navbar .shn-search { grid-column: 2; }
}
@media (max-width: 860px) {
    .app-navbar .shn { grid-template-columns: 1fr auto; padding: 0 14px; }
    .app-navbar .shn-search { display: none; }
}
@media (max-width: 1100px) { .shn-kbd { display: none; } }
@media (max-width: 420px) {
    .app-navbar .shn-logo .logo-img { width: 96px; }
    .app-navbar .chat-icon-btn.shn-icon { width: 40px; height: 40px; }
}

/* ---------- left sidebar ---------- */
.app-sidebar-left.shs {
    display: flex; flex-direction: column;
    background: #fff;
    border-inline-end: 1px solid var(--sh-line);
    padding: 18px 14px 16px;
    scrollbar-width: thin;
}
.shs-cta {
    display: flex; align-items: center; gap: 10px;
    height: 48px; padding: 0 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--sh-brand), var(--sh-brand-2));
    color: #fff; font-weight: 800; font-size: .94rem; text-decoration: none;
    box-shadow: 0 14px 26px -12px rgba(79, 70, 229, .7);
    transition: transform .2s, box-shadow .2s;
}
.shs-cta:hover { transform: translateY(-2px); box-shadow: 0 18px 30px -12px rgba(79, 70, 229, .8); }
.shs-cta-ic { width: 30px; height: 30px; border-radius: 9px; background: rgba(255, 255, 255, .2); display: inline-flex; align-items: center; justify-content: center; }

/* role-specific quick-links section */
.shs-role-section { margin-top: 14px; }
.shs-role-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 13px; background: linear-gradient(135deg, rgba(79, 70, 229, .08), rgba(124, 58, 237, .04)); color: var(--sh-brand); font-weight: 800; font-size: .9rem; text-decoration: none; transition: background .18s; }
.shs-role-card:hover { background: linear-gradient(135deg, rgba(79, 70, 229, .15), rgba(124, 58, 237, .08)); color: var(--sh-brand); }
.shs-role-ic { width: 32px; height: 32px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--sh-brand); color: #fff; }
.shs-role-links { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.shs-role-link { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; font-size: .84rem; font-weight: 700; color: #3a4468; text-decoration: none; transition: background .15s; }
.shs-role-link:hover { background: var(--sh-bg); color: var(--sh-brand); }
.shs-role-link-ic { width: 28px; height: 28px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--sh-bg); color: var(--sh-muted); }
.shs-role-link:hover .shs-role-link-ic { color: var(--sh-brand); }
.shs-role-link .shs-verify-badge { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #f59e0b; margin-inline-start: 4px; }
.shs-company-link { display: flex; align-items: center; gap: 8px !important; padding: 6px 8px !important; border-radius: 13px; border: 1px solid var(--sh-line); text-decoration: none; color: var(--sh-text); font-weight: 700; font-size: .88rem; transition: background .15s, border-color .15s; }
.shs-company-link:hover { background: var(--sh-bg); border-color: var(--sh-brand); color: var(--sh-text); }
.shs-company-logo { width: 32px !important; height: 32px !important; border-radius: 8px !important; object-fit: cover; background: var(--sh-bg); flex-shrink: 0; }
.shs-company-info { min-width: 0; display: flex; flex-direction: column; }
.shs-company-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; font-weight: 700; line-height: 1.3; }
.shs-company-role { font-size: .72rem; font-weight: 600; color: var(--sh-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* quick links populated by JS per role */
.shs-quick-links { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.shs-quick-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 11px; font-size: .86rem; font-weight: 700; color: #3a4468; text-decoration: none; transition: background .15s; }
.shs-quick-link:hover { background: var(--sh-bg); color: var(--sh-brand); }
.shs-quick-link-ic { width: 30px; height: 30px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: var(--sh-bg); color: var(--sh-muted); }
.shs-quick-link:hover .shs-quick-link-ic { color: var(--sh-brand); }
.shs-quick-link--primary .shs-quick-link-ic { background: var(--sh-brand); color: #fff; }

/* Office switcher (sidebar + top-nav mirror). Current office is a company card
   with a chevron toggle; the "others" list sits below it as a compact list. */
.shs-office-switcher { position: relative; }
.shs-office-current { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 13px; border: 1px solid var(--sh-line); text-decoration: none; color: var(--sh-text); font-weight: 700; transition: background .15s, border-color .15s; }
.shs-office-current:hover { background: var(--sh-bg); border-color: var(--sh-brand); color: var(--sh-text); }
.shs-office-current .shs-company-logo { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; background: var(--sh-bg); flex-shrink: 0; }
.shs-office-current .shs-company-info { min-width: 0; display: flex; flex-direction: column; flex: 1; }
.shs-office-toggle { margin-inline-start: auto; width: 24px; height: 24px; border: 0; border-radius: 8px; background: transparent; color: var(--sh-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: transform .2s, background .15s; }
.shs-office-toggle:hover { background: var(--sh-bg); color: var(--sh-brand); }
.shs-office-switcher.is-open .shs-office-toggle { transform: rotate(180deg); }
.shs-office-list { margin-top: 4px; display: flex; flex-direction: column; gap: 2px; padding: 4px; border-radius: 12px; background: var(--sh-bg); }
.shs-office-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 9px; font-size: .84rem; font-weight: 700; color: var(--sh-text); text-decoration: none; transition: background .15s; }
.shs-office-item:hover { background: #fff; color: var(--sh-brand); }
.shs-office-item .shs-company-logo-sm { width: 24px; height: 24px; border-radius: 6px; object-fit: cover; background: #fff; flex-shrink: 0; }
.shs-office-item-text { min-width: 0; display: flex; flex-direction: column; }
.shs-office-item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .84rem; }
.shs-office-item-role { font-size: .7rem; font-weight: 600; color: var(--sh-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Account dropdown mirror: a lighter card at the top of the menu. */
.account-office-switcher { padding: 4px; margin-bottom: 4px; border-radius: 13px; }
.account-office-switcher .shs-office-current { background: var(--sh-bg); border-color: transparent; }
.account-office-switcher .shs-office-list { padding: 4px; background: transparent; border: 1px solid var(--sh-line); }

/* Inline verify row (sits above the logout divider, not loud). */
.dropdown-item-verify--inline { background: transparent !important; color: var(--sh-muted) !important; font-weight: 600; padding: 8px 12px; border-radius: 11px; }
.dropdown-item-verify--inline:hover { background: var(--sh-bg) !important; color: var(--sh-brand) !important; }
.dropdown-item-verify--inline .verify-item-icon { opacity: .85; }

/* show more toggle */
.shs-more-wrap { margin-top: 8px; }
.shs-more-btn { display: flex; align-items: center; gap: 6px; width: 100%; padding: 8px 10px; border: 0; border-radius: 11px; background: transparent; font: inherit; font-size: .82rem; font-weight: 700; color: var(--sh-muted); cursor: pointer; transition: color .15s; }
.shs-more-btn:hover { color: var(--sh-brand); }
.shs-more-chev { flex: none; opacity: .55; transition: transform .2s; }
.shs-more-wrap.is-open .shs-more-chev { transform: rotate(180deg); }
.shs-more-content[hidden] { display: none; }

.shs-nav { flex: 0 0 auto; }

/* Logout inside the collapsible "Show more" group - only visible when the
   user expands the extra nav. Tinted red to stand out from other links. */
.shs-logout-link { color: #dc2626 !important; }
.shs-logout-link:hover { background: rgba(239, 68, 68, .08) !important; color: #b91c1c !important; }
.shs-label { margin: 20px 10px 6px; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--sh-soft); }
[dir="rtl"] .shs-label { letter-spacing: 0; font-size: .76rem; }
.app-sidebar-left .app-sidebar-nav { gap: 2px; }
.app-sidebar-left .app-sidebar-link {
    position: relative;
    display: flex; align-items: center; gap: 12px;
    padding: 7px 10px; border-radius: 13px;
    font-size: .92rem; font-weight: 700; color: #3a4468;
    text-decoration: none;
    transition: background-color .18s, color .18s;
}
.shs-ic {
    width: 34px; height: 34px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px; background: var(--sh-bg); color: var(--sh-muted);
    transition: background-color .18s, color .18s, box-shadow .18s;
}
.app-sidebar-left .app-sidebar-link svg { opacity: 1; }
.app-sidebar-left .app-sidebar-link:hover { background: var(--sh-bg); color: var(--sh-text); }
.app-sidebar-left .app-sidebar-link:hover .shs-ic { background: #fff; color: var(--sh-brand); box-shadow: 0 2px 8px rgba(15, 22, 40, .08); }
.app-sidebar-left .app-sidebar-link.nav-active { background: linear-gradient(135deg, rgba(79, 70, 229, .1), rgba(124, 58, 237, .06)); color: var(--sh-brand); }
.app-sidebar-left .app-sidebar-link.nav-active .shs-ic { background: linear-gradient(135deg, var(--sh-brand), var(--sh-brand-2)); color: #fff; box-shadow: 0 8px 16px -6px rgba(79, 70, 229, .6); }
.app-sidebar-left .app-sidebar-link.nav-active::before {
    content: ""; position: absolute; inset-block: 9px; inset-inline-start: -14px; width: 4px;
    border-radius: 0 4px 4px 0; background: linear-gradient(180deg, var(--sh-brand), var(--sh-brand-2));
}
[dir="rtl"] .app-sidebar-left .app-sidebar-link.nav-active::before { border-radius: 4px 0 0 4px; }

.shs .app-sidebar-auth { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--sh-line); }
.shs #sidebarUserProfileSlot:not(:empty) { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--sh-line); }

.shs-switch {
    margin-top: 16px; padding: 10px;
    border: 1px solid var(--sh-line); border-radius: 16px; background: var(--sh-bg);
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.shs-switch .language-switcher { background: #fff; border: 1px solid var(--sh-line); border-radius: 999px; padding: 3px; gap: 2px; }
.shs-switch .lang-btn { border-radius: 999px; padding: 5px 12px; font-weight: 800; color: var(--sh-muted); }
.shs-switch .lang-btn.active { background: var(--sh-ink); color: #fff; }
.shs-switch .user-info { padding: 6px 12px; border: 1px solid var(--sh-line); border-radius: 999px; background: #fff; gap: 6px; }

/* ---------- right sidebar ---------- */
.app-sidebar-right.shr {
    display: flex; flex-direction: column;
    background: var(--sh-bg);
    border-inline-start: 1px solid var(--sh-line);
    padding: 18px 14px;
    scrollbar-width: thin;
}
.shr-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; padding-inline: 2px; }
.shr-title { margin: 0; display: flex; align-items: center; gap: 8px; font-size: .95rem; font-weight: 800; letter-spacing: 0; text-transform: none; color: var(--sh-text); }
.shr-title::before { content: ""; width: 6px; height: 1.15em; border-radius: 3px; background: linear-gradient(180deg, var(--sh-gold), var(--sh-gold-2)); }
.shr-all { font-size: .8rem; font-weight: 800; color: var(--sh-brand); text-decoration: none; }
.shr-all:hover { text-decoration: underline; text-underline-offset: 3px; }
.shr-feed { display: flex; flex-direction: column; gap: 12px; }
.shr-empty { color: var(--sh-muted); font-size: .85rem; padding: 8px 2px; }

.fd-card {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px;
    border-radius: 18px;
    background: #fff; border: 1px solid var(--sh-line);
    box-shadow: 0 1px 2px rgba(15, 22, 40, .04);
    color: inherit; text-decoration: none;
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.fd-card:hover { transform: translateY(-3px); border-color: #b9b4f7; box-shadow: 0 20px 34px -18px rgba(15, 22, 40, .3); }
.fd-av {
    width: 52px; height: 52px; flex-shrink: 0;
    border-radius: 50%; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--sh-brand), var(--sh-brand-2));
    color: #fff; font-weight: 800; font-size: .95rem;
    box-shadow: 0 0 0 3px var(--sh-bg);
}
.fd-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fd-av--sq { border-radius: 16px; background: linear-gradient(135deg, #0a0f1f, #3b4a8a); }
.fd-card--firm .fd-av--sq:has(img) { background: #fff; border: 1px solid var(--sh-line); }
.fd-av--law { border-radius: 14px; width: 44px; height: 44px; background: rgba(16, 185, 129, .13); color: #059669; box-shadow: none; }
.fd-body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; flex: 1; padding-top: 2px; }
.fd-name {
    display: flex; align-items: center; gap: 5px;
    max-width: 100%;
    font-size: .92rem; font-weight: 800; line-height: 1.45; color: var(--sh-text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fd-name--wrap { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; }
.fd-card--firm .fd-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; }
.fd-verified { flex-shrink: 0; vertical-align: middle; }
.fd-tag { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: .7rem; font-weight: 800; letter-spacing: 0; white-space: nowrap; }
.fd-tag--brand { background: rgba(79, 70, 229, .1); color: var(--sh-brand); }
.fd-tag--gold { background: rgba(212, 167, 58, .17); color: #8a6508; }
.fd-tag--green { background: rgba(16, 185, 129, .13); color: #067a55; }
.fd-tag--violet { background: rgba(124, 58, 237, .13); color: var(--sh-brand-2); }
.fd-meta { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; font-size: .76rem; font-weight: 600; color: var(--sh-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-meta svg { flex-shrink: 0; color: var(--sh-soft); }
.fd-excerpt { font-size: .78rem; line-height: 1.6; color: var(--sh-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.fd-card--firm { position: relative; }
.fd-card--firm::before {
    content: ""; position: absolute; inset-block: 14px; inset-inline-start: 0; width: 4px;
    border-radius: 0 4px 4px 0; background: linear-gradient(180deg, var(--sh-gold), var(--sh-gold-2));
}
[dir="rtl"] .fd-card--firm::before { border-radius: 4px 0 0 4px; }

.fd-card--post { flex-direction: column; align-items: stretch; padding: 0; overflow: hidden; gap: 0; }
.fd-cover { position: relative; display: block; aspect-ratio: 16 / 9; background: rgba(124, 58, 237, .1); overflow: hidden; }
.fd-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.fd-card--post:hover .fd-cover img { transform: scale(1.05); }
.fd-cover-fb { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--sh-brand-2); }
.fd-cover-tag { position: absolute; top: 10px; inset-inline-start: 10px; background: rgba(255, 255, 255, .95); box-shadow: 0 4px 10px rgba(15, 22, 40, .12); }
.fd-card--post .fd-body { padding: 12px 14px 14px; gap: 6px; width: 100%; }

.fd-card--law { background: linear-gradient(0deg, rgba(16, 185, 129, .035), rgba(16, 185, 129, .035)), #fff; }

.shr-join {
    margin-top: 16px; padding: 18px;
    border-radius: 20px; color: #fff;
    background: radial-gradient(120% 90% at 100% 0%, rgba(124, 58, 237, .55), transparent 60%), linear-gradient(160deg, #0a0f1f, #151f45);
    box-shadow: 0 20px 36px -18px rgba(10, 15, 31, .6);
}
.shr-join b { display: block; font-size: 1rem; font-weight: 800; line-height: 1.5; }
.shr-join p { margin: 6px 0 14px; font-size: .84rem; line-height: 1.7; color: #c5cae6; }
.shr-join-btn {
    display: flex; align-items: center; justify-content: center;
    height: 42px; border-radius: 999px;
    background: linear-gradient(135deg, var(--sh-gold-2), var(--sh-gold));
    color: #1b1404; font-weight: 800; font-size: .9rem; text-decoration: none;
    transition: transform .2s, box-shadow .2s;
}
.shr-join-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -10px rgba(212, 167, 58, .7); }

/* ---------- mobile drawer ---------- */
@media (max-width: 991px) {
    .app-sidebar-left.shs {
        width: min(310px, 88vw);
        padding: 16px 12px 22px;
        border-inline-end: 0;
        border-radius: 0 24px 24px 0;
        box-shadow: 0 30px 70px -12px rgba(10, 15, 31, .4);
    }
    [dir="rtl"] .app-sidebar-left.shs { border-radius: 24px 0 0 24px; }
    /* The drawer is a fixed-height flex column that scrolls as a whole. With
       the nav allowed to shrink (flex: 1 1 auto; min-height: 0, fine on
       desktop) its links overflowed and painted UNDER the account chip and
       the language/currency card, so those looked like they sat on top of
       "About us" / "Contact". On phones the nav keeps its natural height and
       the drawer scrolls instead. */
    .shs-nav { flex: 0 0 auto; min-height: auto; }
    .app-sidebar-left.shs > * { flex-shrink: 0; }
    body.shn-drawer-open::after {
        content: ""; position: fixed; inset: var(--navbar-h) 0 0 0;
        background: rgba(10, 15, 31, .38); z-index: 150;
        -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
    }
}

/* ---------- right sidebar: desktop only ----------
   Hidden on phones and tablets (below 1200px, which includes iPad landscape),
   and its reserved width is released so the page content takes the space. */
@media (max-width: 1199px) {
    :root { --app-sidebar-right-w: 0px; }
    .app-sidebar-right { display: none !important; }
}

/* ---- sidebar group: Court services (opens a list of what is inside) ---- */
.app-sidebar-left .shs-sub-btn { width: 100%; border: 0; background: transparent; font: inherit; text-align: start; cursor: pointer; }
.app-sidebar-left .shs-sub-t { flex: 1; min-width: 0; }
.app-sidebar-left .shs-chev { flex: none; margin-inline-start: auto; opacity: .55; transition: transform .2s; }
.app-sidebar-left .shs-sub.is-open .shs-chev { transform: rotate(180deg); }
.app-sidebar-left .shs-sub-list { list-style: none; margin: 4px 0 6px; padding: 4px; padding-inline-start: 12px; display: flex; flex-direction: column; gap: 2px; border-inline-start: 2px solid rgba(99, 102, 241, .22); margin-inline-start: 22px; }
.app-sidebar-left .shs-sub-list[hidden] { display: none; }
.app-sidebar-left .shs-sub-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 11px; font-size: .88rem; font-weight: 700; color: #3a4468; text-decoration: none; min-height: 40px; }
.app-sidebar-left .shs-sub-link i { font-style: normal; width: 22px; text-align: center; font-size: 1rem; }
.app-sidebar-left .shs-sub-link:hover { background: var(--sh-bg); color: var(--sh-text); }
.app-sidebar-left .shs-sub-link.on { background: linear-gradient(135deg, rgba(79, 70, 229, .12), rgba(124, 58, 237, .07)); color: var(--sh-brand); }
.app-sidebar-left .shs-sub-btn { font-family: inherit; font-size: .92rem; font-weight: 700; color: #3a4468; }
.app-sidebar-left .shs-sub-btn.nav-active { color: var(--sh-brand); }

/* promoted (pinned) firm in the Featured sidebar */
.fd-card--ad { border-color: rgba(212,167,58,.55) !important; background: linear-gradient(135deg, rgba(212,167,58,.10), transparent 60%); box-shadow: 0 8px 22px -14px rgba(212,167,58,.7); }
.fd-ad { display: inline-block; margin-inline-start: .35rem; padding: 1px 7px; border-radius: 999px; font-size: .62rem; font-weight: 700; letter-spacing: .02em; color: #8a6410; background: rgba(212,167,58,.18); }

/* ===== Unified account menu (sidebar scope) ===== Same classes/structure
   as the navbar dropdown version in main.css; themed to match the
   sidebar's lighter surface and muted border. Rendered by
   _renderAccountMenu() into #shs-company-card. */
#shs-company-card .account-item {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 6px 8px !important;
    border-radius: 10px !important;
    text-decoration: none !important;
    color: var(--sh-text) !important;
    transition: background .15s, border-color .15s !important;
    border: 1px solid transparent !important;
}
#shs-company-card .account-item + .account-item { margin-top: 3px !important; }
#shs-company-card .account-item:hover {
    background: var(--sh-bg) !important;
    border-color: var(--sh-line) !important;
}
#shs-company-card .account-item--profile.is-selected {
    background: linear-gradient(135deg, rgba(79, 70, 229, .10), rgba(124, 58, 237, .05)) !important;
    border-color: rgba(79, 70, 229, .22) !important;
}
#shs-company-card .account-item--profile.is-selected .account-item-name { color: var(--sh-brand) !important; }
#shs-company-card .account-item-check {
    width: 14px; height: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--sh-brand);
    flex-shrink: 0;
    opacity: 0;
}
#shs-company-card .account-item--profile.is-selected .account-item-check { opacity: 1; }
#shs-company-card .account-item-logo {
    width: 26px !important; height: 26px !important;
    min-width: 26px !important;
    max-width: 26px !important; max-height: 26px !important;
    flex: 0 0 26px !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
    background: #fff;
}
#shs-company-card .account-item-logo--round { border-radius: 50% !important; }
#shs-company-card .account-item-logo--square { border-radius: 9px !important; }
#shs-company-card .account-item-initial {
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--sh-brand), #8b5cf6);
    color: white;
    font-weight: 700;
    font-size: .95rem;
}
#shs-company-card .account-item-text {
    flex: 1; min-width: 0;
    display: flex !important; flex-direction: column !important; align-items: flex-start !important;
    gap: 1px !important;
}
#shs-company-card .account-item-name {
    font-size: .82rem !important; font-weight: 700 !important;
    color: var(--sh-text) !important;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
#shs-company-card .account-item-role {
    font-size: .66rem !important; font-weight: 600 !important;
    color: var(--sh-muted) !important;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#shs-company-card .account-quick-links {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-top: 8px; padding-top: 8px;
    border-top: 1px solid var(--sh-line);
}
#shs-company-card .account-quick-link {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 9px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--sh-text);
    font-size: .8rem; font-weight: 700;
    background: #fff;
    border: 1px solid var(--sh-line);
    transition: background .15s, color .15s, border-color .15s;
}
#shs-company-card .account-quick-link:hover {
    background: var(--sh-bg);
    color: var(--sh-brand);
    border-color: rgba(79, 70, 229, .22);
}
#shs-company-card .account-quick-link.is-primary {
    background: linear-gradient(135deg, rgba(79, 70, 229, .10), rgba(124, 58, 237, .05));
    color: var(--sh-brand);
    border-color: rgba(79, 70, 229, .22);
}
#shs-company-card .account-quick-link-ic {
    width: 16px; height: 16px;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: inherit;
}
