.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1000;
    width: 264px;
    display: flex;
    flex-direction: column;
    color: #fff;
    background: var(--sidebar);
    box-shadow: 8px 0 30px rgba(0, 0, 0, .08);
}

.logo {
    width: 100%;
    min-height: 88px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    border: 0;
    border-bottom: 1px solid #252525;
    color: #fff;
    background: transparent;
    text-align: left;
}
.logo-icon {
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    font-size: 20px;   
}
.logo-text { margin-left: 12px; display: flex; flex-direction: column; }
.logo-text strong { max-width: 150px; overflow: hidden; text-overflow: ellipsis; font-size: 17px; letter-spacing: .8px; white-space: nowrap; }
.logo-text span { margin-top: 2px; color: var(--accent); font-size: 9px; font-weight: 700; letter-spacing: 2.2px; }

.menu { flex: 1; padding: 24px 14px; overflow-y: auto; }
.menu-title { padding: 0 12px; margin-bottom: 10px; color: #6f7378; font-size: 9px; font-weight: 700; letter-spacing: 1.2px; }
.menu-bottom-title { margin-top: 28px; }
.menu-item {
    min-height: 47px;
    padding: 0 13px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 13px;
    border-radius: 9px;
    color: #a7a9ac;
    font-size: 12.5px;
    text-decoration: none;
    transition: color .18s ease, background .18s ease, transform .18s ease;
}
.menu-item i { width: 20px; flex: 0 0 20px; font-size: 14px; text-align: center; }
.menu-item:hover { color: #fff; background: var(--sidebar-hover); transform: translateX(2px); }
.menu-item.active { color: #fff; background: var(--accent); box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 25%, transparent); }
.notification {
    min-width: 20px;
    height: 20px;
    margin-left: auto;
    padding: 0 6px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: var(--accent);
    font-size: 9px;
    font-weight: 700;
}
.menu-item.active .notification { color: var(--accent); background: #fff; }
.sidebar-footer { padding: 17px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #252525; }
.user-info { min-width: 0; display: flex; align-items: center; gap: 10px; }
.user-info > div:last-child { min-width: 0; }
.user-info strong, .user-info span { max-width: 130px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-info strong { font-size: 11px; }
.user-info span { margin-top: 3px; color: #777; font-size: 9px; }
.user-avatar {
    width: 37px;
    height: 37px;
    flex: 0 0 37px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--accent);
    font-size: 11px;
    font-weight: 700;
}
.logout-btn { width: 34px; height: 34px; border: 0; border-radius: 8px; color: #777; background: transparent; }
.logout-btn:hover { color: #fff; background: #222; }

.main-content { min-height: 100vh; margin-left: 264px; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 700;
    min-height: 74px;
    padding: 0 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(14px);
}
.menu-toggle { display: none; width: 40px; height: 40px; border: 0; border-radius: 9px; background: var(--surface-3); }
.global-search {
    width: min(520px, 50vw);
    height: 42px;
    padding: 0 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--muted);
    background: var(--surface-3);
    transition: border-color .18s ease, box-shadow .18s ease;
}
.global-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.global-search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 12px; }
.global-search input::placeholder { color: var(--muted-2); }
kbd { padding: 3px 6px; border: 1px solid var(--border); border-radius: 5px; color: var(--muted); background: var(--surface); font-size: 9px; box-shadow: var(--shadow-sm); }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.icon-button { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font-size: 17px; }
.icon-button:hover { color: var(--text); background: var(--surface-3); }
.notification-dot { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border: 2px solid var(--surface); border-radius: 50%; background: var(--accent); }
.top-user { padding: 4px 6px 4px 4px; display: flex; align-items: center; gap: 9px; border: 0; border-radius: 10px; background: transparent; }
.top-user:hover { background: var(--surface-3); }
.top-user-info { min-width: 0; text-align: left; }
.top-user-info strong, .top-user-info span { max-width: 120px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-user-info strong { font-size: 11px; }
.top-user-info span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.top-user > i { color: var(--muted); font-size: 9px; }

.popover-wrapper { position: relative; }
.popover {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 1200;
    width: 330px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow-md);
    animation: popoverIn .16s ease;
}
.popover-header { padding: 15px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); font-size: 12px; }
.notification-list { max-height: 340px; overflow-y: auto; }
.notification-item { width: 100%; padding: 13px 16px; display: flex; align-items: center; gap: 11px; border: 0; border-bottom: 1px solid var(--border); background: transparent; text-align: left; }
.notification-item:last-child { border-bottom: 0; }
.notification-item:hover { background: var(--surface-2); }
.notification-item i { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: var(--red); background: var(--red-soft); }
.notification-item div { min-width: 0; flex: 1; }
.notification-item strong, .notification-item span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notification-item strong { font-size: 11px; }
.notification-item span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.popover-empty { padding: 24px 16px; color: var(--muted); font-size: 11px; text-align: center; }
.user-popover { width: 210px; padding: 7px; }
.user-popover button { width: 100%; padding: 10px; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 8px; color: var(--text); background: transparent; font-size: 11px; text-align: left; }
.user-popover button:hover { background: var(--surface-3); }
.user-popover button i { width: 16px; color: var(--muted); }

