/* Admin Portal shell (MainLayout's MudDrawer + NavMenu) - same visual pattern as
   SpotlightAutos.Web's dealer-shell.css: a branded user header block at the top of the
   nav, refined nav-link spacing/radius via the M3 shape scale. */

.admin-shell-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
}

.admin-shell-user__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-image: var(--m3-gradient-hero);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.admin-shell-user__name {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
}

.admin-shell-user__role {
    font-size: 0.8rem;
    color: var(--mud-palette-text-secondary);
    line-height: 1.3;
}

.mud-navmenu .mud-nav-link {
    border-radius: var(--m3-shape-sm);
    margin: 2px 8px;
}

/* Specificity has to at least match MudBlazor's own
   ".mud-navmenu.mud-navmenu-default .mud-nav-link.active:not(.mud-nav-link-disabled)"
   rule (in MudBlazor.min.css, loaded before this file) or it silently loses the cascade
   despite loading later - confirmed via document.styleSheets while this wasn't applying. */
.mud-navmenu.mud-navmenu-default .mud-nav-link.active.mud-ripple:not(.mud-nav-link-disabled) {
    font-weight: 700;
    background-color: var(--m3-primary-container);
    color: var(--m3-on-primary-container);
}

.mud-navmenu.mud-navmenu-default .mud-nav-link.active.mud-ripple:not(.mud-nav-link-disabled) .mud-icon-root {
    color: var(--m3-on-primary-container);
}

/* Narrow drawer (MainLayout sets Width="112px") - icon stacked above a small label instead
   of the usual icon-then-text row, so the nav takes less horizontal space and leaves more
   room for the actual data tables. */
.admin-drawer {
    overflow-x: hidden;
}

.admin-drawer .admin-shell-user {
    flex-direction: column;
    text-align: center;
    gap: 0.375rem;
    padding: 1rem 0.5rem;
}

.admin-drawer .admin-shell-user__name {
    font-size: 0.75rem;
    word-break: break-word;
}

.admin-drawer .admin-shell-user__role {
    font-size: 0.7rem;
}

.admin-drawer .mud-nav-link {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 4px;
    gap: 2px;
}

.admin-drawer .mud-nav-link > * {
    margin: 0 !important;
}

.admin-drawer .mud-nav-link-text {
    font-size: 0.7rem;
    line-height: 1.15;
    white-space: normal;
	text-align: center !important;
}

.admin-drawer form.px-4 {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
}

.admin-drawer form .mud-button-label {
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 0.7rem;
    white-space: normal;
}

/* MudButton's StartIcon ships with an asymmetric -4px/+8px left/right margin meant for a
   side-by-side icon-then-text layout - left over here it pulls the icon a few pixels off
   center against the stacked label above, the exact "icon and word not aligned" the user
   flagged for the Log Out button (the only MudButton in the drawer; every MudNavLink above
   it centers cleanly since it has no such built-in spacing to begin with). */
.admin-drawer form .mud-button-icon-start {
    margin: 0 !important;
}
