Files
projet_gestion_commande/frontend-prep/src/components/Navbar.css
T
Xor290 880d5ac234
Frontend Web - Build & Lint / build (push) Has been cancelled
chore: build
2026-06-21 14:27:54 +02:00

581 lines
13 KiB
CSS

/* ============================================================
Tokens
============================================================ */
:root {
--topbar-h: 60px;
--sidebar-w: 260px;
--bg: #09090b;
--surface: #111115;
--surface-2: #1c1c22;
--border: rgba(255, 255, 255, 0.07);
--primary: #8b5cf6;
--primary-soft: rgba(139, 92, 246, 0.12);
--primary-glow: rgba(139, 92, 246, 0.25);
--cyan: #22d3ee;
--cyan-soft: rgba(34, 211, 238, 0.1);
--red: #ef4444;
--text: #f4f4f5;
--text-muted: #71717a;
--radius: 10px;
--transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
/* ============================================================
Light theme overrides
============================================================ */
[data-theme="light"] {
--bg: #f4f4f8;
--surface: #ffffff;
--surface-2: #ebebf2;
--border: rgba(0, 0, 0, 0.08);
--primary: #7c3aed;
--primary-soft: rgba(124, 58, 237, 0.08);
--primary-glow: rgba(124, 58, 237, 0.18);
--cyan: #0891b2;
--cyan-soft: rgba(8, 145, 178, 0.1);
--red: #dc2626;
--text: #18181b;
--text-muted: #52525b;
}
/* ============================================================
Body offset
============================================================ */
body {
padding-top: var(--topbar-h);
}
/* ============================================================
Top Bar
============================================================ */
.topbar {
position: fixed;
top: 0;
left: 0;
right: 0;
height: var(--topbar-h);
z-index: 900;
display: flex;
align-items: center;
padding: 0 0.75rem;
gap: 0.5rem;
background: color-mix(in srgb, var(--cyan) 18%, var(--bg));
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border-bottom: 1px solid color-mix(in srgb, var(--cyan) 30%, transparent);
box-shadow: 0 1px 24px rgba(0, 0, 0, 0.15);
}
.topbar-toggle {
width: 40px;
height: 40px;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
background: transparent;
border: 1px solid transparent;
border-radius: var(--radius);
color: var(--text-muted);
font-size: 1.1rem;
cursor: pointer;
transition: all var(--transition);
-webkit-tap-highlight-color: transparent;
}
.topbar-toggle:hover,
.topbar-toggle.is-open {
background: var(--surface-2);
border-color: var(--border);
color: var(--text);
}
.topbar-brand {
flex: 1;
text-align: center;
font-size: 1rem;
font-weight: 700;
letter-spacing: 0.02em;
background: linear-gradient(135deg, var(--cyan), color-mix(in srgb, var(--cyan) 60%, var(--primary)));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
user-select: none;
}
.topbar-actions {
display: flex;
align-items: center;
gap: 0.25rem;
}
/* ── Theme toggle button ── */
.topbar-theme-btn {
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
background: transparent;
border: 1px solid transparent;
border-radius: var(--radius);
color: var(--text-muted);
font-size: 1rem;
cursor: pointer;
transition: all var(--transition);
-webkit-tap-highlight-color: transparent;
}
.topbar-theme-btn:hover {
background: var(--surface-2);
border-color: var(--border);
color: var(--text);
}
.topbar-theme-btn:active {
transform: scale(0.93);
}
/* ── Icon button (notif / cart) ── */
.topbar-icon-btn {
position: relative;
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
background: transparent;
border: 1px solid transparent;
border-radius: var(--radius);
color: var(--text-muted);
font-size: 1rem;
cursor: pointer;
transition: all var(--transition);
-webkit-tap-highlight-color: transparent;
}
.topbar-icon-btn:hover {
background: var(--surface-2);
border-color: var(--border);
color: var(--text);
}
.topbar-icon-btn:active {
transform: scale(0.93);
}
.topbar-badge {
position: absolute;
top: 4px;
right: 4px;
min-width: 17px;
height: 17px;
border-radius: 999px;
background: var(--red);
color: #fff;
font-size: 0.62rem;
font-weight: 700;
display: flex;
align-items: center;
justify-content: center;
padding: 0 3px;
border: 2px solid var(--bg);
line-height: 1;
}
/* ============================================================
Overlay
============================================================ */
.sidebar-overlay {
position: fixed;
inset: 0;
z-index: 950;
background: rgba(0, 0, 0, 0.6);
backdrop-filter: blur(2px);
animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
/* ============================================================
Sidebar
============================================================ */
.sidebar {
position: fixed;
top: 0;
left: 0;
width: var(--sidebar-w);
height: 100dvh;
z-index: 1000;
display: flex;
flex-direction: column;
background: var(--bg);
border-right: 1px solid var(--border);
transform: translateX(-100%);
transition: transform var(--transition);
overflow: hidden;
}
.sidebar.open {
transform: translateX(0);
box-shadow: 4px 0 40px rgba(0, 0, 0, 0.6);
}
/* ── Header ── */
.sidebar-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1.25rem 1rem 1rem;
border-bottom: 1px solid var(--border);
flex-shrink: 0;
}
.sidebar-brand {
display: flex;
align-items: center;
gap: 0.75rem;
}
.sidebar-brand-icon {
width: 38px;
height: 38px;
border-radius: 10px;
background: var(--primary-soft);
border: 1px solid rgba(139, 92, 246, 0.25);
display: flex;
align-items: center;
justify-content: center;
color: var(--primary);
font-size: 1rem;
flex-shrink: 0;
}
.sidebar-brand-name {
margin: 0;
font-size: 0.95rem;
font-weight: 700;
color: var(--text);
letter-spacing: 0.01em;
}
.sidebar-brand-sub {
margin: 0;
font-size: 0.72rem;
color: var(--text-muted);
margin-top: 1px;
}
.sidebar-close {
width: 34px;
height: 34px;
display: flex;
align-items: center;
justify-content: center;
background: transparent;
border: 1px solid var(--border);
border-radius: 8px;
color: var(--text-muted);
font-size: 0.85rem;
cursor: pointer;
transition: all var(--transition);
-webkit-tap-highlight-color: transparent;
flex-shrink: 0;
}
.sidebar-close:hover {
background: var(--surface-2);
color: var(--text);
}
/* ── Nav ── */
.sidebar-nav {
flex: 1;
overflow-y: auto;
padding: 0.75rem 0.75rem;
scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar {
display: none;
}
.menu-list {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 2px;
}
.menu-item {
width: 100%;
display: flex;
align-items: center;
gap: 0.85rem;
padding: 0.7rem 0.9rem;
background: transparent;
border: 1px solid transparent;
border-radius: var(--radius);
color: var(--text-muted);
font-size: 0.9rem;
font-weight: 500;
cursor: pointer;
text-align: left;
transition: all var(--transition);
-webkit-tap-highlight-color: transparent;
position: relative;
}
.menu-item:hover:not(:disabled) {
background: var(--surface);
border-color: var(--border);
color: var(--text);
}
.menu-item.active {
background: var(--primary-soft);
border-color: rgba(139, 92, 246, 0.2);
color: var(--primary);
}
.menu-item:active:not(:disabled) {
transform: scale(0.98);
}
.menu-item:disabled {
opacity: 0.4;
cursor: not-allowed;
}
.menu-icon {
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 8px;
background: var(--surface);
font-size: 0.85rem;
flex-shrink: 0;
transition: all var(--transition);
}
.menu-item.active .menu-icon {
background: rgba(139, 92, 246, 0.2);
color: var(--primary);
}
.menu-label {
flex: 1;
}
.menu-dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--primary);
flex-shrink: 0;
box-shadow: 0 0 8px var(--primary-glow);
}
/* ── Footer ── */
.sidebar-footer {
padding: 0.75rem;
border-top: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
background: color-mix(in srgb, var(--primary) 8%, var(--bg));
display: flex;
flex-direction: column;
gap: 0.5rem;
flex-shrink: 0;
}
.sidebar-footer-btn {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
gap: 0.6rem;
padding: 0.7rem 1rem;
border-radius: var(--radius);
font-size: 0.88rem;
font-weight: 600;
cursor: pointer;
transition: all var(--transition);
-webkit-tap-highlight-color: transparent;
}
.sidebar-footer-btn:disabled {
opacity: 0.45;
cursor: not-allowed;
}
.sidebar-footer-btn.telegram {
background: var(--cyan-soft);
border: 1px solid rgba(34, 211, 238, 0.2);
color: var(--cyan);
}
.sidebar-footer-btn.telegram:hover:not(:disabled) {
background: rgba(34, 211, 238, 0.15);
border-color: rgba(34, 211, 238, 0.35);
transform: translateY(-1px);
box-shadow: 0 4px 16px rgba(34, 211, 238, 0.15);
}
.sidebar-footer-btn.logout {
background: rgba(239, 68, 68, 0.08);
border: 1px solid rgba(239, 68, 68, 0.18);
color: #f87171;
}
.sidebar-footer-btn.logout:hover:not(:disabled) {
background: rgba(239, 68, 68, 0.13);
border-color: rgba(239, 68, 68, 0.3);
transform: translateY(-1px);
}
.sidebar-footer-btn:active:not(:disabled) {
transform: scale(0.97);
}
/* ============================================================
Notification bottom-sheet modal
============================================================ */
.notif-modal-overlay {
position: fixed;
inset: 0;
z-index: 1100;
background: rgba(0, 0, 0, 0.55);
backdrop-filter: blur(3px);
-webkit-backdrop-filter: blur(3px);
display: flex;
align-items: flex-end;
justify-content: center;
animation: fadeIn 0.18s ease;
}
.notif-modal {
width: 100%;
max-width: 640px;
height: 70vh;
background: var(--surface);
border-top-left-radius: 20px;
border-top-right-radius: 20px;
display: flex;
flex-direction: column;
overflow: hidden;
box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
animation: slideUp 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideUp {
from { transform: translateY(100%); }
to { transform: translateY(0); }
}
.notif-modal-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1.1rem 1.25rem;
border-bottom: 1px solid var(--border);
flex-shrink: 0;
}
.notif-modal-title {
color: var(--text);
font-size: 1.05rem;
font-weight: 700;
}
.notif-modal-close {
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
background: transparent;
border: 1px solid var(--border);
border-radius: 8px;
color: var(--text-muted);
font-size: 0.9rem;
cursor: pointer;
transition: all var(--transition);
}
.notif-modal-close:hover {
background: var(--surface-2);
color: var(--text);
}
.notif-modal-body {
flex: 1;
overflow-y: auto;
scrollbar-width: thin;
scrollbar-color: var(--border) transparent;
}
.notif-modal-body::-webkit-scrollbar { width: 4px; }
.notif-modal-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.notif-empty {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 3rem 1.5rem;
color: var(--text-muted);
font-size: 0.9rem;
gap: 0.5rem;
height: 100%;
}
.notif-empty p { margin: 0; }
.notif-item {
display: flex;
flex-direction: column;
gap: 0.3rem;
padding: 0.9rem 1.25rem;
border-bottom: 1px solid var(--border);
border-left: 3px solid transparent;
transition: background var(--transition);
}
.notif-item:last-child { border-bottom: none; }
.notif-unread {
background: var(--primary-soft);
border-left-color: var(--primary);
}
.notif-read {
opacity: 0.55;
}
.notif-message {
color: var(--text);
font-size: 0.88rem;
line-height: 1.5;
}
.notif-time {
color: var(--text-muted);
font-size: 0.74rem;
}
/* ============================================================
Responsive
============================================================ */
@media (hover: none) {
.menu-item:hover { background: transparent; border-color: transparent; color: var(--text-muted); }
.menu-item.active:hover { background: var(--primary-soft); color: var(--primary); }
.topbar-toggle:hover { background: transparent; border-color: transparent; }
.topbar-icon-btn:hover { background: transparent; border-color: transparent; }
}