Some checks failed
Deploy Application / deploy (push) Has been cancelled
291 lines
6.8 KiB
CSS
291 lines
6.8 KiB
CSS
/**
|
|
* Header Component - Admin Interface
|
|
*
|
|
* Top header bar with page title, search, notifications, and user menu.
|
|
* Sticky positioning with backdrop blur for modern look.
|
|
*/
|
|
|
|
@layer components {
|
|
/**
|
|
* Header Container
|
|
*/
|
|
.admin-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--spacing-sm);
|
|
background-color: var(--header-bg);
|
|
border-bottom: 1px solid var(--header-border);
|
|
padding: var(--spacing-sm) var(--spacing-content-padding);
|
|
min-height: var(--header-height-mobile);
|
|
|
|
/* Sticky with blur effect */
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: var(--z-header);
|
|
backdrop-filter: blur(8px);
|
|
background-color: var(--header-bg);
|
|
|
|
@media (min-width: 768px) {
|
|
min-height: var(--header-height-tablet);
|
|
}
|
|
|
|
@media (min-width: 1440px) {
|
|
min-height: var(--header-height-wide);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Page Title
|
|
*/
|
|
.admin-header__title {
|
|
font-size: var(--font-size-lg);
|
|
font-weight: 600;
|
|
color: var(--header-text);
|
|
margin: 0;
|
|
flex: 1;
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
|
|
@media (max-width: 767px) {
|
|
/* Hide on mobile, show breadcrumbs instead */
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Search Bar Container
|
|
*/
|
|
.admin-header__search {
|
|
flex: 0 1 400px;
|
|
max-width: 400px;
|
|
|
|
@media (max-width: 767px) {
|
|
/* Full width on mobile */
|
|
flex: 1;
|
|
max-width: none;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Header Actions (Right Side)
|
|
*/
|
|
.admin-header__actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--spacing-sm);
|
|
margin-left: auto;
|
|
}
|
|
|
|
/**
|
|
* Action Button (Icon Button)
|
|
*/
|
|
.admin-action-btn {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 36px;
|
|
height: 36px;
|
|
border-radius: var(--radius-md);
|
|
background-color: transparent;
|
|
border: 1px solid transparent;
|
|
color: var(--header-text);
|
|
cursor: pointer;
|
|
transition: all var(--transition-base);
|
|
position: relative;
|
|
|
|
&:hover {
|
|
background-color: var(--hover-overlay);
|
|
border-color: var(--border-light);
|
|
}
|
|
|
|
&:focus-visible {
|
|
outline: 2px solid var(--focus-ring);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
/* Dark Theme Optimization */
|
|
@media (prefers-color-scheme: dark) {
|
|
&:hover {
|
|
background-color: oklch(from var(--header-bg) calc(l + 0.03) c h);
|
|
}
|
|
}
|
|
}
|
|
|
|
.admin-action-btn__icon {
|
|
width: 18px;
|
|
height: 18px;
|
|
}
|
|
|
|
/**
|
|
* Notification Badge
|
|
*/
|
|
.admin-action-btn__badge {
|
|
position: absolute;
|
|
top: 6px;
|
|
right: 6px;
|
|
width: 8px;
|
|
height: 8px;
|
|
background-color: var(--accent-error);
|
|
border: 2px solid var(--header-bg);
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.admin-action-btn__badge--count {
|
|
width: auto;
|
|
height: auto;
|
|
min-width: 18px;
|
|
padding: 2px 5px;
|
|
font-size: 10px;
|
|
font-weight: 600;
|
|
color: white;
|
|
line-height: 1;
|
|
border-radius: 9px;
|
|
}
|
|
|
|
/**
|
|
* Theme Toggle Button
|
|
*/
|
|
.admin-theme-toggle {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--spacing-xs);
|
|
padding: var(--spacing-xs) var(--spacing-sm);
|
|
background-color: var(--bg-secondary);
|
|
border: 1px solid var(--border-light);
|
|
border-radius: var(--radius-md);
|
|
cursor: pointer;
|
|
transition: all var(--transition-base);
|
|
|
|
&:hover {
|
|
background-color: var(--bg-tertiary);
|
|
}
|
|
|
|
/* Dark Theme Optimization */
|
|
@media (prefers-color-scheme: dark) {
|
|
&:hover {
|
|
background-color: oklch(from var(--bg-secondary) calc(l + 0.05) c h);
|
|
}
|
|
}
|
|
|
|
@media (max-width: 767px) {
|
|
/* Icon only on mobile */
|
|
padding: var(--spacing-xs);
|
|
|
|
.admin-theme-toggle__label {
|
|
display: none;
|
|
}
|
|
}
|
|
}
|
|
|
|
.admin-theme-toggle__icon {
|
|
width: 18px;
|
|
height: 18px;
|
|
color: var(--header-text);
|
|
}
|
|
|
|
.admin-theme-toggle__label {
|
|
font-size: var(--font-size-sm);
|
|
color: var(--header-text);
|
|
}
|
|
|
|
/**
|
|
* User Menu Dropdown
|
|
*/
|
|
.admin-user-menu {
|
|
position: relative;
|
|
}
|
|
|
|
.admin-user-menu__trigger {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--spacing-sm);
|
|
padding: var(--spacing-xs);
|
|
background-color: transparent;
|
|
border: 1px solid transparent;
|
|
border-radius: var(--radius-md);
|
|
cursor: pointer;
|
|
transition: all var(--transition-base);
|
|
|
|
&:hover {
|
|
background-color: var(--hover-overlay);
|
|
border-color: var(--border-light);
|
|
}
|
|
|
|
&:focus-visible {
|
|
outline: 2px solid var(--focus-ring);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
/* Dark Theme Optimization */
|
|
@media (prefers-color-scheme: dark) {
|
|
&:hover {
|
|
background-color: oklch(from var(--header-bg) calc(l + 0.03) c h);
|
|
}
|
|
}
|
|
}
|
|
|
|
.admin-user-menu__avatar {
|
|
width: 32px;
|
|
height: 32px;
|
|
border-radius: 50%;
|
|
object-fit: cover;
|
|
border: 2px solid var(--border-light);
|
|
}
|
|
|
|
.admin-user-menu__name {
|
|
font-size: var(--font-size-sm);
|
|
font-weight: 500;
|
|
color: var(--header-text);
|
|
|
|
@media (max-width: 767px) {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.admin-user-menu__chevron {
|
|
width: 16px;
|
|
height: 16px;
|
|
color: var(--header-text);
|
|
transition: transform var(--transition-base);
|
|
|
|
/* Rotate when popover is open (handled by JavaScript) */
|
|
@media (max-width: 767px) {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.admin-user-menu__item {
|
|
list-style: none;
|
|
margin: 0;
|
|
}
|
|
|
|
.admin-user-menu__link {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--spacing-sm);
|
|
padding: var(--spacing-sm) var(--spacing-md);
|
|
color: var(--content-text);
|
|
text-decoration: none;
|
|
font-size: var(--font-size-sm);
|
|
transition: background-color var(--transition-base);
|
|
|
|
&:hover {
|
|
background-color: var(--bg-secondary);
|
|
}
|
|
}
|
|
|
|
.admin-user-menu__icon {
|
|
width: 18px;
|
|
height: 18px;
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.admin-user-menu__divider {
|
|
height: 1px;
|
|
background-color: var(--border-light);
|
|
margin: var(--spacing-sm) 0;
|
|
}
|
|
}
|