Files
scalesApp/frontend/src/components/Header.css
T

224 lines
4.1 KiB
CSS

.app-header {
background: var(--header-bg);
color: var(--header-text);
padding: 0;
box-shadow: var(--shadow-raised);
position: sticky;
top: 0;
z-index: 100;
}
.header-content {
max-width: 1400px;
margin: 0 auto;
padding: 16px 20px;
display: flex;
justify-content: space-between;
align-items: center;
}
.header-left {
display: flex;
align-items: center;
gap: 16px;
}
.header-left h1 {
margin: 0;
font-size: 24px;
font-weight: 600;
}
.nav-button {
width: 42px;
height: 42px;
border-radius: var(--radius);
background: var(--header-chrome);
border: 1px solid var(--header-chrome-border);
color: var(--header-text);
font-size: 20px;
cursor: pointer;
transition: background 0.2s, transform 0.2s;
display: flex;
align-items: center;
justify-content: center;
padding: 0;
}
.nav-button:hover {
background: var(--header-chrome-hover);
transform: scale(1.05);
}
/* Header dropdown — the report editor button opens a choice of editors rather
than navigating straight to one, since the two are not interchangeable. */
.nav-dropdown {
position: relative;
display: flex;
}
/* Over the page, under the menu: any outside click closes it. */
.nav-dropdown-backdrop {
position: fixed;
inset: 0;
z-index: 100;
}
.nav-dropdown-menu {
position: absolute;
top: calc(100% + 6px);
left: 0;
z-index: 101;
min-width: 220px;
background: var(--surface);
border-radius: var(--radius);
box-shadow: var(--shadow-overlay);
overflow: hidden;
}
.nav-dropdown-menu button {
display: block;
width: 100%;
padding: 10px 14px;
background: none;
border: none;
text-align: left;
cursor: pointer;
color: var(--text);
font-family: inherit;
}
.nav-dropdown-menu button + button {
border-top: 1px solid var(--border);
}
.nav-dropdown-menu button:hover {
background: var(--surface-hover);
}
.nav-dropdown-menu strong {
display: block;
font-size: 13px;
font-weight: 600;
}
.nav-dropdown-menu span {
display: block;
margin-top: 2px;
font-size: 11px;
color: var(--text-muted);
}
.header-right {
display: flex;
align-items: center;
gap: 20px;
}
.user-info {
display: flex;
flex-direction: column;
align-items: flex-end;
margin-right: 10px;
}
.user-name {
font-weight: 600;
font-size: 14px;
}
.user-role {
font-size: 12px;
opacity: 0.9;
}
.avatar-container {
display: flex;
align-items: center;
gap: 12px;
}
.avatar {
width: 42px;
height: 42px;
border-radius: 50%;
background: var(--header-avatar-bg);
color: var(--header-avatar-text);
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
font-size: 16px;
cursor: pointer;
transition: transform 0.2s, box-shadow 0.2s;
box-shadow: var(--shadow-card);
}
.avatar:hover {
transform: scale(1.05);
box-shadow: var(--shadow-raised);
}
.logout-button {
padding: 8px 16px;
background: var(--header-chrome);
border: 1px solid var(--header-chrome-border);
color: var(--header-text);
border-radius: 6px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: background 0.2s;
}
.logout-button:hover {
background: var(--header-chrome-hover);
}
@media (max-width: 768px) {
.header-content {
flex-direction: column;
gap: 12px;
align-items: stretch;
}
.header-left h1 {
font-size: 18px;
text-align: center;
}
.header-right {
justify-content: space-between;
}
.user-info {
align-items: flex-start;
margin-right: 0;
}
}
/* Theme toggle — same chrome as the nav buttons, so it reads as part of the
header furniture rather than a feature being advertised. */
.theme-toggle {
width: 38px;
height: 38px;
border-radius: var(--radius-sm);
background: var(--header-chrome);
border: 1px solid var(--header-chrome-border);
color: var(--header-text);
font-size: 17px;
line-height: 1;
cursor: pointer;
transition: background 0.2s, transform 0.2s;
display: flex;
align-items: center;
justify-content: center;
padding: 0;
flex-shrink: 0;
}
.theme-toggle:hover {
background: var(--header-chrome-hover);
transform: scale(1.05);
}