.fh-page-header {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--fh-space-4);
    margin-bottom: var(--fh-space-4);
}

.fh-page-header-main {
    min-width: 0;
}

.fh-page-title {
    margin: 0;
    color: var(--fh-text);
    font-size: var(--fh-font-xl);
    font-weight: 800;
    line-height: 1.15;
}

.fh-page-subtitle {
    margin-top: var(--fh-space-1);
    color: var(--fh-text-muted);
    font-size: var(--fh-font-sm);
}

.fh-surface {
    color: var(--fh-text);
    background: var(--fh-surface);
    border: 1px solid var(--fh-border-soft);
    border-radius: var(--fh-radius-md);
}

.fh-panel {
    color: var(--fh-text);
    background: var(--fh-surface);
    border: 1px solid var(--fh-border-soft);
    border-radius: var(--fh-radius-md);
    box-shadow: var(--fh-shadow-sm);
}

.fh-toolbar {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--fh-space-3);
}

.fh-toolbar-main,
.fh-toolbar-actions {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: var(--fh-space-2);
}

.fh-toolbar-actions {
    justify-content: flex-end;
    flex-shrink: 0;
}

.fh-section-title {
    margin: 0 0 var(--fh-space-3);
    color: var(--fh-text);
    font-size: var(--fh-font-md);
    font-weight: 800;
}

.fh-muted {
    color: var(--fh-text-muted);
}

.fh-divider {
    border-top: 1px solid var(--fh-divider);
}

.fh-empty-state {
    min-height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--fh-space-2);
    padding: var(--fh-space-4);
    color: var(--fh-text-muted);
    text-align: center;
}

.fh-empty-state i {
    font-size: 1.5rem;
}

.fh-icon-box {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--fh-primary);
    background: var(--fh-primary-soft);
    border-radius: var(--fh-radius-sm);
}

.fh-status-dot {
    width: 8px;
    height: 8px;
    display: inline-block;
    flex-shrink: 0;
    background: var(--fh-text-muted);
    border-radius: var(--fh-radius-pill);
}

.fh-scroll-x {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

.fh-scroll-y {
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
}

@media (max-width: 767.98px) {
    .fh-page-header {
        align-items: flex-start;
        gap: var(--fh-space-3);
    }

    .fh-page-title {
        font-size: 1.2rem;
    }

    .fh-page-subtitle {
        font-size: .82rem;
    }

    .fh-toolbar {
        align-items: flex-start;
    }
}

/* =========================================================
   NAVBAR
   ========================================================= */

.fh-navbar {
    height: var(--fh-navbar-height, 56px);
    padding: 0;
    color: #fff;
    background: var(--fh-navbar-bg, #275f49);
    border-bottom: 1px solid color-mix(in srgb, #fff 12%, transparent);
    box-shadow: 0 1px 8px rgba(0, 0, 0, .12);
}

.fh-navbar-inner {
    height: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: .5rem;
    padding-inline: .55rem;
}

.fh-navbar-side {
    min-width: 0;
    display: flex;
    align-items: center;
}

.fh-navbar-actions {
    justify-content: flex-end;
    gap: .4rem;
}

.fh-navbar-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: rgba(255, 255, 255, .92);
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: var(--fh-radius-sm);
    transition: background-color var(--fh-transition-fast), border-color var(--fh-transition-fast), transform var(--fh-transition-fast);
}

.fh-navbar-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, .14);
    border-color: rgba(255, 255, 255, .48);
}

.fh-navbar-btn:active {
    transform: scale(.96);
}

.fh-navbar-brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    color: #fff;
    font-size: 1rem;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
}

.fh-navbar-brand:hover {
    color: #fff;
}

.fh-navbar-brand-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--fh-navbar-bg, #275f49);
    background: rgba(255, 255, 255, .92);
    border-radius: 6px;
    font-size: .8rem;
}

/* =========================================================
   ACCOUNT DROPDOWN
   ========================================================= */

.fh-account-menu {
    min-width: 235px;
    padding: .4rem;
    background: var(--fh-surface-elevated);
    border: 1px solid var(--fh-border);
    border-radius: var(--fh-radius-md);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
}

.fh-account-header {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .5rem;
}

.fh-account-avatar {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--fh-primary);
    background: var(--fh-primary-soft);
    border-radius: var(--fh-radius-sm);
}

.fh-account-header>span:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.fh-account-header strong {
    color: var(--fh-text);
    font-size: .8rem;
}

.fh-account-header small {
    color: var(--fh-text-muted);
    font-size: .66rem;
}

.fh-account-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-height: 38px;
    padding: .4rem .55rem;
    color: var(--fh-text-secondary);
    border-radius: var(--fh-radius-sm);
    font-size: .78rem;
    font-weight: 650;
}

.fh-account-menu .dropdown-item i {
    width: 18px;
    text-align: center;
}

.fh-account-menu .dropdown-item:hover {
    color: var(--fh-text);
    background: var(--fh-surface-hover);
}

/* =========================================================
   SIDEBAR
   ========================================================= */

.fh-sidebar {
    --bs-offcanvas-width: 276px;
    width: 276px !important;
    color: var(--fh-text);
    background: var(--fh-surface);
    border-right: 1px solid var(--fh-border);
}

.fh-sidebar-header {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    padding: .55rem .7rem;
    background: var(--fh-surface-elevated);
    border-bottom: 1px solid var(--fh-border);
}

.fh-sidebar-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .6rem;
    color: var(--fh-text);
    text-decoration: none;
}

.fh-sidebar-brand:hover {
    color: var(--fh-text);
}

.fh-sidebar-brand-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    background: var(--fh-primary);
    border-radius: var(--fh-radius-sm);
}

.fh-sidebar-brand>span:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.fh-sidebar-brand strong {
    color: var(--fh-text);
    font-size: .91rem;
    font-weight: 850;
    line-height: 1.1;
}

.fh-sidebar-brand small {
    margin-top: .1rem;
    color: var(--fh-text-muted);
    font-size: .62rem;
    font-weight: 600;
}

.fh-sidebar-close {
    width: 32px;
    height: 32px;
    min-width: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--fh-text-muted);
    background: transparent;
    border: 0;
    border-radius: var(--fh-radius-sm);
}

.fh-sidebar-close:hover {
    color: var(--fh-text);
    background: var(--fh-surface-hover);
}

/* =========================================================
   SIDEBAR BODY
   ========================================================= */

.fh-sidebar-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: .55rem;
    overflow-y: auto;
    background: var(--fh-surface);
    scrollbar-width: thin;
}

.fh-sidebar-section {
    margin-bottom: .85rem;
}

.fh-sidebar-section:last-child {
    margin-bottom: 0;
}

.fh-sidebar-section-title {
    padding: .25rem .55rem .35rem;
    color: var(--fh-text-muted);
    font-size: .57rem;
    font-weight: 850;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.fh-sidebar-link {
    width: 100%;
    min-height: 43px;
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .12rem;
    padding: .35rem .45rem;
    color: var(--fh-text-secondary);
    background: transparent;
    border: 0;
    border-radius: var(--fh-radius-sm);
    font-size: .8rem;
    font-weight: 700;
    text-align: left;
    text-decoration: none;
    transition:
        color var(--fh-transition-fast),
        background-color var(--fh-transition-fast),
        transform var(--fh-transition-fast);
}

.fh-sidebar-link:hover {
    color: var(--fh-text);
    background: var(--fh-surface-hover);
}

.fh-sidebar-link:active {
    transform: scale(.985);
}

.fh-sidebar-link.active {
    color: var(--fh-primary);
    background: var(--fh-primary-soft);
}

.fh-sidebar-link.active::after {
    content: "";
    width: 3px;
    height: 22px;
    margin-left: auto;
    background: var(--fh-primary);
    border-radius: var(--fh-radius-pill);
}

.fh-sidebar-icon {
    width: 31px;
    height: 31px;
    min-width: 31px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--fh-text-muted);
    background: var(--fh-bg-secondary);
    border-radius: 6px;
    font-size: .78rem;
}

.fh-sidebar-link:hover .fh-sidebar-icon {
    color: var(--fh-text);
    background: var(--fh-surface-hover);
}

.fh-sidebar-link.active .fh-sidebar-icon {
    color: var(--fh-primary);
    background: color-mix(in srgb, var(--fh-primary) 12%, var(--fh-surface));
}

.fh-sidebar-link-button {
    font-family: inherit;
}

/* =========================================================
   SIDEBAR FOOTER
   ========================================================= */

.fh-sidebar-footer {
    flex: 0 0 auto;
    padding: .5rem;
    background: var(--fh-surface-elevated);
    border-top: 1px solid var(--fh-border);
}

.fh-sidebar-user {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-height: 52px;
    padding: .4rem .45rem;
    color: var(--fh-text-secondary);
    border-radius: var(--fh-radius-sm);
    text-decoration: none;
}

.fh-sidebar-user:hover {
    color: var(--fh-text);
    background: var(--fh-surface-hover);
}

.fh-sidebar-user-avatar {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    background: var(--fh-primary);
    border-radius: 50%;
    font-size: .75rem;
}

.fh-sidebar-user-info {
    min-width: 0;
    display: flex;
    flex: 1;
    flex-direction: column;
}

.fh-sidebar-user-info strong {
    overflow: hidden;
    color: var(--fh-text);
    font-size: .75rem;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fh-sidebar-user-info small {
    margin-top: .08rem;
    color: var(--fh-text-muted);
    font-size: .59rem;
}

.fh-sidebar-user-arrow {
    color: var(--fh-text-muted);
    font-size: .65rem;
}

/* =========================================================
   SIDEBAR DARK
   ========================================================= */

[data-fh-theme="dark"] .fh-sidebar {
    background: #15191a;
    border-right-color: rgba(255, 255, 255, .07);
}

[data-fh-theme="dark"] .fh-sidebar-header {
    background: #1b2220;
    border-bottom-color: rgba(255, 255, 255, .07);
}

[data-fh-theme="dark"] .fh-sidebar-body {
    background: #15191a;
}

[data-fh-theme="dark"] .fh-sidebar-brand,
[data-fh-theme="dark"] .fh-sidebar-brand:hover,
[data-fh-theme="dark"] .fh-sidebar-brand strong {
    color: #fff;
}

[data-fh-theme="dark"] .fh-sidebar-brand small {
    color: #89938f;
}

[data-fh-theme="dark"] .fh-sidebar-close {
    color: #9ca6a2;
}

[data-fh-theme="dark"] .fh-sidebar-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, .07);
}

[data-fh-theme="dark"] .fh-sidebar-section-title {
    color: #73807b;
}

[data-fh-theme="dark"] .fh-sidebar-link {
    color: #c7cfcc;
}

[data-fh-theme="dark"] .fh-sidebar-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, .055);
}

[data-fh-theme="dark"] .fh-sidebar-link.active {
    color: #fff;
    background: color-mix(in srgb, var(--fh-primary) 23%, transparent);
}

[data-fh-theme="dark"] .fh-sidebar-icon {
    color: #aab3af;
    background: rgba(255, 255, 255, .045);
}

[data-fh-theme="dark"] .fh-sidebar-link:hover .fh-sidebar-icon {
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

[data-fh-theme="dark"] .fh-sidebar-link.active .fh-sidebar-icon {
    color: var(--fh-primary);
    background: rgba(255, 255, 255, .1);
}

[data-fh-theme="dark"] .fh-sidebar-footer {
    background: #121617;
    border-top-color: rgba(255, 255, 255, .07);
}

[data-fh-theme="dark"] .fh-sidebar-user {
    color: #d7ddda;
}

[data-fh-theme="dark"] .fh-sidebar-user:hover {
    color: #fff;
    background: rgba(255, 255, 255, .055);
}

[data-fh-theme="dark"] .fh-sidebar-user-info strong {
    color: #fff;
}

[data-fh-theme="dark"] .fh-sidebar-user-info small {
    color: #77817d;
}

[data-fh-theme="dark"] .fh-sidebar-user-arrow {
    color: #737d79;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 576px) {
    .fh-navbar-inner {
        padding-inline: .35rem;
    }

    .fh-navbar-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

    .fh-navbar-brand {
        gap: .4rem;
        font-size: .9rem;
    }

    .fh-navbar-brand-icon {
        width: 26px;
        height: 26px;
        font-size: .72rem;
    }

    .fh-sidebar {
        --bs-offcanvas-width: min(86vw, 285px);
        width: min(86vw, 285px) !important;
    }
}