/* /public_html/assets/css/dashboard-sidebar.css */

.dashboard-sidebar {
    position: fixed;
    top: calc(var(--app-header-height) + 0.35rem);
    left: 0.2rem;
    width: var(--dashboard-sidebar-width-collapsed, 4.35rem);
    height: calc(100dvh - var(--app-header-height) - 0.55rem);
    min-height: 35rem;
    z-index: 24;
    transition: width 220ms ease, transform 220ms ease;
}

.dashboard-app-shell.is-sidebar-expanded .dashboard-sidebar {
    width: var(--dashboard-sidebar-width-expanded, 18.25rem);
}

.dashboard-sidebar__inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    padding: 0.7rem;
    border: 1px solid var(--color-border-subtle);
    border-radius: calc(var(--radius-lg) + 0.2rem);
    background: color-mix(in srgb, var(--color-surface, var(--color-bg-elevated)) 92%, transparent);
    box-shadow: var(--shadow-subtle);
    backdrop-filter: blur(14px);
    overflow: hidden;
}

html[data-theme="dark"] .dashboard-sidebar__inner {
    background: color-mix(in srgb, var(--color-surface, #0b1120) 76%, #020617 24%);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.58);
}

.dashboard-sidebar__top {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.dashboard-sidebar__toggle {
    width: 100%;
    min-height: 3rem;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.75rem 0.95rem;
    border: 1px solid var(--color-border-subtle);
    border-radius: 1rem;
    background: color-mix(in srgb, var(--color-surface, #fff) 92%, transparent);
    color: var(--color-text);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.dashboard-sidebar__toggle:hover {
    background: color-mix(in srgb, var(--color-accent) 8%, var(--color-surface, #fff));
    border-color: color-mix(in srgb, var(--color-accent) 28%, var(--color-border-subtle));
}

.dashboard-sidebar__toggle-label {
    min-width: 0;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.dashboard-sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior: contain;
}

.dashboard-sidebar__nav::-webkit-scrollbar,
.dashboard-sidebar__nav::-webkit-scrollbar-thumb,
.dashboard-sidebar__nav::-webkit-scrollbar-track,
.dashboard-sidebar__nav::-webkit-scrollbar-corner {
    width: 0;
    height: 0;
    background: transparent;
}

.dashboard-sidebar__section {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.dashboard-sidebar__section-title {
    margin: 0;
    padding-inline: 0.55rem;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-text-soft);
    white-space: nowrap;
}

.dashboard-sidebar__section-title.is-hidden {
    display: none;
}

.dashboard-sidebar__section-items {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.dashboard-sidebar__item {
    position: relative;
    width: 100%;
    min-height: 2.85rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.72rem 0.88rem;
    border: 0;
    border-radius: 1rem;
    background: transparent;
    color: var(--color-text-soft);
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.dashboard-sidebar__item::before {
    content: '';
    position: absolute;
    left: 0.25rem;
    top: 0.45rem;
    bottom: 0.45rem;
    width: 4px;
    border-radius: 999px;
    background: transparent;
    transition: background-color 160ms ease;
}

.dashboard-sidebar__item:hover {
    background: color-mix(in srgb, var(--color-accent) 8%, transparent);
    color: var(--color-text);
}

.dashboard-sidebar__item.is-active {
    background: color-mix(in srgb, var(--color-accent) 14%, transparent);
    color: var(--color-text);
}

.dashboard-sidebar__item.is-active::before {
    background: var(--color-accent);
}

.dashboard-sidebar__item-icon {
    width: 1.45rem;
    height: 1.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 1.45rem;
    line-height: 1;
    color: var(--sidebar-item-accent);
    transition: color 160ms ease, transform 160ms ease;
}

.dashboard-sidebar__item-label {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 700;
    white-space: nowrap;
}

.dashboard-app-shell.is-sidebar-collapsed .dashboard-sidebar__section-title,
.dashboard-app-shell.is-sidebar-collapsed .dashboard-sidebar__item-label,
.dashboard-app-shell.is-sidebar-collapsed .dashboard-sidebar__toggle-label {
    opacity: 0;
    pointer-events: none;
    width: 0;
}

.dashboard-app-shell.is-sidebar-collapsed .dashboard-sidebar__toggle,
.dashboard-app-shell.is-sidebar-collapsed .dashboard-sidebar__item {
    justify-content: center;
    padding-inline: 0.68rem;
}

.dashboard-app-shell.is-sidebar-collapsed .dashboard-sidebar__inner {
    padding-inline: 0.45rem;
}

.dashboard-app-shell.is-sidebar-collapsed .dashboard-sidebar__item::before {
    left: 50%;
    top: auto;
    bottom: 0.2rem;
    width: 1.5rem;
    height: 4px;
    transform: translateX(-50%);
}

.dashboard-app-shell.is-sidebar-collapsed .dashboard-sidebar__top {
    justify-content: center;
}

.dashboard-app-shell.is-sidebar-collapsed .dashboard-sidebar__toggle {
    position: relative;
    display: grid;
    place-items: center;
    width: 2.85rem;
    min-height: 2.85rem;
    height: 2.85rem;
    margin-inline: auto;
    padding: 0;
}

.dashboard-app-shell.is-sidebar-collapsed .dashboard-sidebar__item {
    display: grid;
    place-items: center;
    width: 2.85rem;
    min-height: 2.85rem;
    height: 2.85rem;
    margin-inline: auto;
    padding: 0;
}

.dashboard-sidebar__item,
.dashboard-sidebar__toggle {
    line-height: 1;
}

.dashboard-sidebar__item {
    --sidebar-item-accent: var(--color-accent, #ef4444);
}

.dashboard-sidebar__item[data-dashboard-shell-tone="neutral"] {
    --sidebar-item-accent: color-mix(in srgb, var(--color-text-soft) 72%, #94a3b8 28%);
}

.dashboard-sidebar__item[data-dashboard-shell-tone="blue-deep"] {
    --sidebar-item-accent: #2e5fd3;
}

.dashboard-sidebar__item[data-dashboard-shell-tone="blue"] {
    --sidebar-item-accent: #2da5e6;
}

.dashboard-sidebar__item[data-dashboard-shell-tone="green"] {
    --sidebar-item-accent: #35c96a;
}

.dashboard-sidebar__item[data-dashboard-shell-tone="red"] {
    --sidebar-item-accent: #ef5350;
}

.dashboard-sidebar__item-icon > i,
.dashboard-sidebar__toggle > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    line-height: 1;
    font-size: 1.08rem;
    text-align: center;
    transform: none;
}

.dashboard-sidebar__item:hover,
.dashboard-sidebar__item.is-active {
    background: var(--sidebar-item-accent);
    color: #ffffff;
    box-shadow: 0 10px 22px color-mix(in srgb, var(--sidebar-item-accent) 34%, transparent);
}

.dashboard-sidebar__item:hover::before,
.dashboard-sidebar__item.is-active::before {
    background: #ffffff;
}

.dashboard-sidebar__item:hover .dashboard-sidebar__item-icon,
.dashboard-sidebar__item.is-active .dashboard-sidebar__item-icon {
    color: #ffffff;
}

.dashboard-sidebar__item:hover .dashboard-sidebar__item-label,
.dashboard-sidebar__item.is-active .dashboard-sidebar__item-label {
    color: #ffffff;
}

.dashboard-app-shell.is-sidebar-collapsed .dashboard-sidebar__toggle > i {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.45rem;
    height: 1.45rem;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transform: translate(-50%, -50%);
}

.dashboard-app-shell.is-sidebar-collapsed .dashboard-sidebar__item {
    position: relative;
}

.dashboard-app-shell.is-sidebar-collapsed .dashboard-sidebar__item-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.45rem;
    height: 1.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    flex: 0 0 1.45rem;
    transform: translate(-50%, calc(-50% - 0.12rem));
}

.dashboard-app-shell.is-sidebar-collapsed .dashboard-sidebar__item-icon > i {
    width: 1.08rem;
    height: 1.08rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin: 0;
    transform: none;
}

.dashboard-sidebar__item[data-dashboard-shell-tone="neutral"].is-active,
.dashboard-sidebar__item[data-dashboard-shell-tone="neutral"]:hover {
    background: color-mix(in srgb, var(--color-text) 12%, transparent);
    color: var(--color-text);
    box-shadow: none;
}

.dashboard-sidebar__item[data-dashboard-shell-tone="neutral"].is-active .dashboard-sidebar__item-icon,
.dashboard-sidebar__item[data-dashboard-shell-tone="neutral"]:hover .dashboard-sidebar__item-icon,
.dashboard-sidebar__item[data-dashboard-shell-tone="neutral"].is-active .dashboard-sidebar__item-label,
.dashboard-sidebar__item[data-dashboard-shell-tone="neutral"]:hover .dashboard-sidebar__item-label {
    color: var(--color-text);
}

.dashboard-sidebar__item[data-dashboard-shell-tone="neutral"].is-active::before,
.dashboard-sidebar__item[data-dashboard-shell-tone="neutral"]:hover::before {
    background: var(--color-text);
}
